Menu

Tree [b8e22b] master 0.6.2 /
 History

HTTPS access


File Date Author Commit
 assets 2025-05-04 Alexander Gromnitsky Alexander Gromnitsky [bff2d1] rm junk, simplify makefile
 lib 2025-05-04 Alexander Gromnitsky Alexander Gromnitsky [f8d198] temporarily include 'tooltip' package from tklib
 test 2025-05-04 Alexander Gromnitsky Alexander Gromnitsky [f8d198] temporarily include 'tooltip' package from tklib
 vendor 2025-05-04 Alexander Gromnitsky Alexander Gromnitsky [f8d198] temporarily include 'tooltip' package from tklib
 LICENSE 2016-03-26 Alexander Gromnitsky Alexander Gromnitsky [da6163] update docs
 Makefile 2025-05-04 Alexander Gromnitsky Alexander Gromnitsky [b8e22b] mk: fix 'release' target
 README.md 2025-05-04 Alexander Gromnitsky Alexander Gromnitsky [bff2d1] rm junk, simplify makefile
 tktz 2025-05-04 Alexander Gromnitsky Alexander Gromnitsky [f8d198] temporarily include 'tooltip' package from tklib
 tktz.js 2016-04-03 Alexander Gromnitsky Alexander Gromnitsky [0cfae8] add windows wrapper & icon

Read Me


title: tktz, a timezone viewer

<script> document.addEventListener("DOMContentLoaded", function() { if (window.location.href.match(/^file:/)) { var nodes = document.querySelectorAll('.web') Array.prototype.slice.call(nodes).forEach(function(val) { val.style.display = 'none' }) } }) </script>

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:

  • 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").

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:

  • TZ env var.
  • .Xdefaults Tktz.conf.tz resource, e.g.:

    Tktz.conf.tz_local: Africa/Johannesburg
    
  • If 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

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 * Tcl/Tk 9 * Tcllib ### Windows * ActiveTcl ## Installation ### Linux/BSD 0. Clone the repo. 1. Create a symlink from `$repo/tktz` to a directory in PATH. #### Windows 0. Clone the repo. 1. Open cmd. 2. cd to `$repo`. 3. Click on `tktz.js`. You may create a shortcut to it (use the supplied `$repo/assets/main.ico` icon). 4. To run the app manually, type: wish -encoding utf-8 tktz

News

  • 0.6.2

    • Fedora 42 fixes for Tcl 9;
    • update zone1970.tab;
    • Remove chocolatey package.

License

MIT.