Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd line accept timezone abbreviations #33

Open
26labs opened this issue Nov 8, 2022 · 2 comments
Open

cmd line accept timezone abbreviations #33

26labs opened this issue Nov 8, 2022 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@26labs
Copy link

26labs commented Nov 8, 2022

It is tedious and error prone to enter full names. For most people using timezones regulalry we will remember the most used zone abbreviations e.g. AEDT instead of australia/sydney or CST instead of america/los_angeles

@oz
Copy link
Owner

oz commented Nov 14, 2022

Thanks for opening an issue here. 😄

I don't plan to work on this personally, but this is an interesting improvement and similar issues exist to try to make time zone selection and discovery less annoying (c.f. #30).

As always, contributions are welcome. If you'd like to see that feature sooner than later, please post a comment, and let people know what you're up to! 🙇🏻

@oz oz added enhancement New feature or request help wanted Extra attention is needed labels Nov 14, 2022
@jnd-au
Copy link
Contributor

jnd-au commented Oct 9, 2024

Timezone abbreviations are not unique, for example IST could be Israel +02:00 or India +05:30. And for such overlaps, the “ST” abbreviation can mean at least two opposite things: either Standard Time (no daylight saving) or Summer Time (with daylight saving). Potential workarounds: (a) tz aborts and shows the ambiguous options with their numerical offsets and full names, so that the user to re-try with the full unique name (b) tz shows an interactive menu and the user is required to choose between the options (c) tz would show all distinct variations.

So, the problem has some solutions, but they add complexity. I know it would be a useful feature, e.g. if a user is told that an event is happening in “EST” they might want to interrogate tz. However, people also use informal abbreviations like “ET” (as a USA shorthand for EST/EDT) so it would be hard to support all real-world abbreviations.

Also, if people can use the abbreviations on the command line then they’ll expect to use them for configuring tz’s TZ_LIST. However, an abbreviation like AEDT is bad for TZ_LIST because it’s incorrect for half the year (because “Australia/Sydney” swaps between “AEST” and “AEDT” during the year), so users should not use these abbreviations. So, tz would probably need to have different logic to accept abbreviations interactively while forbidding abbreviations in TZ_LIST.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants