tktz, a timezone viewer

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.

Keyboard shortcuts

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

Calculator reads a date specification in a free form, like “04/28 10pm” & converts it to the foreign time. For example:

For a full DSL description see clock(n) (a section “FREE FORM SCAN”).

How to read Sunset/Sunrise data

The general format is:

↑-left/expected-at ↓-left/expected-atleft

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.

Configuration

The default local timezone value comes from:

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

Windows

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

Get the latest version

https://sourceforge.net/projects/tktz/

git clone git://git.code.sf.net/p/tktz/code tktz

Requirements

Linux/BSD

Windows

Installation

Linux/BSD

  1. Clone the repo.
  2. Create a symlink from $repo/tktz to a directory in PATH.

Windows

  1. Clone the repo.

  2. Open cmd.

  3. cd to $repo.

  4. Click on tktz.js. You may create a shortcut to it (use the supplied $repo/assets/main.ico icon).

  5. To run the app manually, type:

     wish -encoding utf-8 tktz

News

License

MIT.