tktz displays the current time in 2 different timezones: in the local & in the foreign one. You can calculate the arbitrary local time like "wed 2pm" in the desired foreign timezone, filter the list of timezones, swap local w/ foreign, pinpoint the particular data entry on Google Maps, view sunrise/sunset time periods.
It works offline & doesn't alter your OS environmental timezone settings.
As timezone data becames quicky outdated in some regions, tktz doesn't ship its own version of a TZ database but relies on the version provided by the OS. To get the latest data for
tcl
& tzdata
packages.Press this key | To do this |
---|---|
Esc | Exit |
Enter | Filter/Calculate |
↑ | Navigate through a timesone list |
↓ | |
F1 | This help |
F2 | Set the selected timezone as the local |
F3 | Swap local timezone w/ foreign |
F4 | Reset |
Calculator reads a date specification in a free form, like "04/28 10pm" & converts it to the foreign time. For example:
friday
means next Friday 00:00 or today if today is indeed Friday;next friday
means next Friday 00:00;fri 9am
means next Friday 09:00;04/20 15:30
means April 20 of this year, 3:30pm;2020/12/01 14:32
is self-explanatory;tomorrow 10am
is self-explanatory.For a full DSL description see clock(n) (a section "FREE FORM SCAN").
The general format is:
↑-left/expected-at ↓-left/expected-at ☼left
Prefix | Meaning |
---|---|
↑ | Sunrise |
⇑ | Sunrise for the next day |
↓ | Sunset |
⇓ | Sunset for the next day |
☼ | Daylight |
☼☼ | Daylight for the next day |
For example:
Tue Apr 05 02:57:52 EEST 2016 ↑-03:26:57/06:24:49 ↓--/19:37:15 ☼13:12:26
It's a night, the Sun is going to rise at 06:24, -03:26 is a remaining time that is left before the sunrise. The sunset is expected at 19:37. The total amount of daylight is 13:12.
Or the evening of the same day:
Tue Apr 05 22:24:32 EEST 2016 ⇑-07:58:07/06:22:39 ⇓--/19:38:51 ☼☼13:16:11
As the sunrise & the sunset are both over, you see a data for the next day.
In certain locations you may get:
Mon Apr 18 00:05:00 CEST 2016 ↑--/- ↓--/- ☼24:00:00
which means you're a bowhead whale that leaves near Svalbard where on April 18 the Sun never sets down (the midnight sun phenomenon).
The default local timezone value comes from:
TZ
env var..Xdefaults Tktz.conf.tz
resource, e.g.:
Tktz.conf.tz_local: Africa/Johannesburg
If all above fails, we set it to Europe/Kiev
. (Btw, it should be Europe/Kyiv
, but the maintainers of the tz distribution always come up w/ all kinds of nonsensical excuses.)
To list all the valid timezone names, run:
$ tktz -l
To get this list of AREA/LOCATION names, tktz reads zone1970.tab
file. You can supply your own version of it in a command line argument like:
$ tktz myfile.tab
To set the default filter, use .Xdefaults Tktz.conf.filter
resource:
Tktz.conf.filter: ^au
To set the local timezone, set TZ
env variable (press Win
, type "env") or create %APPDATA%\.Xdefaults
file w/ something like this:
Tktz.conf.tz_local: Africa/Johannesburg
! the next line sets the default filter & it's optional
Tktz.conf.filter: ^au
To list all the valid timezone names, run:
> tclsh path\to\tktz -l
https://sourceforge.net/projects/tktz/
git clone git://git.code.sf.net/p/tktz/code tktz
$repo/tktz
to a directory in PATH.The easiest way:
> choco install tktz
This installs ActiveTcl automatically. Then search for tktz in the Start Menu.
$repo
.tktz.js
. You may create a shortcut to it (use the supplied $repo/assets/main.ico
icon).To run the app manually, type:
wish -encoding utf-8 tktz
0.6.1
0.6.0
0.5.1
0.4.0
zone1970.tab
instead of a deprecated zone.tab
.-f
CLO.0.3.2
zone.tab
file.-f
CLO.MIT.