You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current tz command is somewhat basic. Some of the shortcomings are:
It can only convert to a set of standard time zones (aliases)
Time zone aliases can only be changed via PRs
It cannot convert to a specific time zone that is not in the standard list.
I would like to revamp the interface as follows:
Examples
Update user preference
Use the “me” sub-command to register user preference. The data is stored and remembered so the user just needs to set it up once.
> tz me
Hey @tk3369, type `tz me [timezone]` to set up your local time zone.
You can find a list of time zones at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
> tz me America/Los_Angeles
Hey @tk3369, your local time zone has been updated to America/Los_Angeles.
> tz me America/wat
Hey @tk3369, sorry, time zone "America/wat" is not valid.
You can find a list of time zones at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
Set up system-wide aliases
Use “alias” sub-command to list, add, or remove time zone aliases. List results are sorted by alias names.
> tz alias list
Hey @tk3369, the time zone aliases are:
- BRU: Europe/Brussels
- LA: America/Los_Angeles
> tz alias set NY America/New_York
Hey @tk3369, a new time zone alias "NY" has been set to "America/New_York"
> tz alias rm NY
Hey @tk3369, time zone alias "NY" has been removed.
> tz alias rm BMW
Hey @tk3369, sorry, time zone alias "BMW" does not exist.
> tz alias set modtz America/Los_Angeles, America/New_York, Asia/Kolkata
Hey @tk3369, the new alias group `modtz` has been added with the following time zones:
- America/Los_Angeles
- America/New_York
> tz alias list
Hey @tk3369, time zone aliases are as follows:
- BRU: Europe/Brussels
- LA: America/Los_Angeles
- modtz: America/Los_Angeles, America/New_York, Asia/Kolkata
Convert to MY timezone
> tz convert 2021-03-21 03:00PM NY
Hey @tk3369, the local time for 2021-03-21 03:00PM NY is 2021-03-21 12:00PM America/Los_Angeles.
If I haven't configured my local timezone, then:
> tz convert 2021-03-21 03:00PM NY
Hey @tk3369, you have not configured your local time zone. Type `tz me` command to set that up.
Convert to OTHER timezones
Add a “to” function. Display results in standard time zones.
> tz convert 2021-03-21 03:00PM LA to NY
Hey @tk3369, 2021-03-21 03:00PM LA is same as 2021-03-21 06:00PM NY
> tz convert 2021-03-21 03:00PM LA to BMW
Hey @tk3369, sorry, time zone "BMW" does not exist.
> tz convert 2021-03-21 03:00PM LA to modtz
Hey @tk3369, 2021-03-21 03:00PM LA is the same as:
- 2021-03-21 03:00PM Americas/Los_Angeles (LA)
- 2021-03-21 06:00PM Americas/New_York (NY)
- 2021-03-21 03:30AM Asia/Kolkata (India)
The text was updated successfully, but these errors were encountered:
The current tz command is somewhat basic. Some of the shortcomings are:
I would like to revamp the interface as follows:
Examples
Update user preference
Use the “me” sub-command to register user preference. The data is stored and remembered so the user just needs to set it up once.
Set up system-wide aliases
Use “alias” sub-command to list, add, or remove time zone aliases. List results are sorted by alias names.
Convert to MY timezone
If I haven't configured my local timezone, then:
Convert to OTHER timezones
Add a “to” function. Display results in standard time zones.
The text was updated successfully, but these errors were encountered: