[go: up one dir, main page]

Timezone location guessing case sensitivities

Hadn't used it in a while so I first looked at the help:

  --date WHEN, -d WHEN  target date for the meeting, supports arbitrary dates
                        like "in two weeks" [default: now]

--- dev/undertime ‹master› » ./undertime -d 26 montreal
WARNING: date provided cannot be parsed: 26
WARNING: unknown zone, skipping: montreal
Table generated for time: 2018-12-21 20:50:00+01:00
╔═══════╗
║HereIAm║

First request: 1 number after -d is the next date of the month if it's <31.

--- dev/undertime ‹master› » ./undertime -d 26th of december montreal
WARNING: date provided cannot be parsed: 26th
WARNING: unknown zone, skipping: december
WARNING: unknown zone, skipping: montreal
Table generated for time: 2018-12-21 20:56:00+01:00
╔═══════╦═══════════════════════╦════════════════════╦══════════════╦═════════════════╗
║HereIAm║ America/Port_of_Spain ║ Europe/Isle_of_Man ║ Europe/Sofia ║ Pacific/Fakaofo ║
╠═══════╬═══════════════════════╬════════════════════╬══════════════╬═════════════════╣

Second request: make sure silly users like me use quotes (that's a joke).

Second request: Quoting "26th of december" would give me output for 2019-12-01. I don't understand this, how is it getting to that date? I get the feeling that I can't do anything right. Turned out locations are case sensitive and I should have used something like:

./undertime -d "2018-12-26" America/Montreal

When is the location guessed, to what extent, when is it case sensitive? Would it make sense to make --help be more verbose? Or maybe a config file to specify my ~6 most used time zones?

Edited by kwadronaut