tktz displays the current time in 2 different timezones: local & foreign. You can convert an arbitrary local time, like “wed 2 pm” to a desired foreign timezone, filter the list of timezones, swap local/foreign zones, pinpoint a specific location on Google Maps, & view sunrise/sunset periods.
It works offline & does not alter your system’s environmental timezone settings.
| 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 nighttime. The sun is going to rise at 06:24. The “-03:26” indicates the remaining time until sunrise. The sunset is expected at 19:37, and the total duration of daylight is 13 hours and 12 minutes.
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
Since both sunrise and sunset have already occurred, the data shown is for the next day.
In certain locations, you may see something like this:
Mon Apr 18 00:05:00 CEST 2016 ↑–/- ↓–/- ☼24:00:00
This means you’re like a bowhead whale living near Svalbard, where on April 18 the sun never sets—a phenomenon known as the midnight sun.
The default local timezone value comes from:
TZ env var.
.Xdefaults Tktz.conf.tz resource, e.g.:
Tktz.conf.tz_local: Africa/JohannesburgIf all the above fails, we set it to
Europe/Kyiv.
To list all the valid timezone names, run:
$ tktz -l
To get such a list, tktz reads zone1970.tab file. You
can supply your own version of it:
$ 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.Clone the repo.
Open cmd.
cd to $repo.
Click on 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 tktz0.6.2
zone1970.tab;MIT.