Skip to main content

worldclock-tty

CI PyPI version Python versions License: MIT DeepWiki

A terminal-based world clock that displays multiple timezones in real-time.

worldclock-tty screenshot

This program is a heavy refactor of a timezone clock I made in 2016.

Installation

uv tool install worldclock-tty

Usage

Run the clock:

worldclock-tty

Press Ctrl+C to exit.

The display shows your local time at the top, followed by all configured timezones in two columns, updated once a second by default (configurable with --interval).

Options

Flag Default Description
--sort / --no-sort on Sort timezones by UTC offset (lowest first).
--offset / --no-offset on Show the UTC offset (e.g. UTC-3) next to each time.
--interval / -n 1 Seconds between refreshes, snapped to the wall clock (e.g. -n 5 ticks at :00, :05, :10).
--12h / --24h --24h Use a 12-hour clock with AM/PM instead of 24-hour.
--military / --no-military off Show NATO/military zone letters (Z, N, P, …) instead of UTC±N. Alias: --zulu.
--utc off With --military, also show the numeric offset next to the letter.
--full-military / --no-full-military off Show a full military Date-Time Group (e.g. 041430Z JUL 26). Alias: --dtg.
--theme saved or default Color theme for this run: default, mono, matrix, amber, ocean.
--color (none) Per-element color override, e.g. --color city=green (repeatable).
worldclock-tty --no-sort          # keep the order from config
worldclock-tty --no-offset        # hide UTC offset labels
worldclock-tty -n 5               # refresh every 5s, aligned to :00, :05, :10
worldclock-tty --12h              # 12-hour clock with AM/PM
worldclock-tty --military         # Zulu/November letters instead of UTC±N
worldclock-tty --military --utc   # letters and the numeric offset (e.g. P UTC-3)
worldclock-tty --full-military    # DTG format: 041430Z JUL 26
worldclock-tty --theme matrix     # use a color theme for this run
worldclock-tty --color time=green --color city=45   # tweak individual colors
worldclock-tty --no-sort --no-offset

--interval (-n) sets the seconds between refreshes and snaps each redraw to the wall clock: -n 5 updates at :00, :05, :10, …; -n 2 at :00, :02, :04, …; and -n 60 at the top of each minute. Intervals that don't divide a minute evenly (e.g. -n 7) stay evenly spaced from midnight. It pairs well with --full-military (minute-precision) and with a clock left running all day.

Military zone letters map each whole-hour UTC offset to a letter: Z is UTC+0, A…M run east (skipping J, reserved for local time), and N…Y run west. Offsets with no official designator (half-hour zones like India at UTC+5:30, or anything beyond ±12h) fall back to the numeric UTC±N.

--full-military (--dtg) replaces each time with a Date-Time Group: DDHHMM + zone letter + MON YY, e.g. 041430Z JUL 26 (day 04, 14:30, Zulu, July 2026). It is minute-precision and always 24-hour, so it overrides the offset and --12h flags. Zones with no official letter use *.

The LOCAL header always ends in J (Juliet). In the military system Juliet is local time itself, not a fixed UTC offset, so the header stays J whatever your offset happens to be. This is expected even when your own zone also appears in the list with its offset letter: at UTC-3 the header reads ...J while the matching row reads ...P (Papa). The two are consistent: J labels "your local time", P labels "the -3 offset".

Colors and themes

Every element on screen is colorable: city, offset, time (the world-clock rows) and label, date, local-time (the LOCAL header). Colors are given as a name (e.g. green, cornflower_blue) or a 256-color code (0–255).

Pick a built-in theme for a run, or override individual elements with --color (repeatable). Precedence, lowest to highest: default, the saved theme, --theme, then --color.

worldclock-tty --theme ocean
worldclock-tty --theme matrix --color time=196     # theme, then tweak one element
worldclock-tty --color label=cyan --color city=45  # override on the default theme

Save a theme as your default. That is the only thing persisted in the config; per-run --color tweaks are never saved:

worldclock-tty theme set matrix    # persist as the default
worldclock-tty theme list          # list themes; the saved one is marked
worldclock-tty theme reset         # back to the built-in default

Built-in themes: default, mono, matrix, amber, ocean.

Managing timezones

Timezones are stored in $XDG_CONFIG_HOME/worldclock-tty/config.json (defaults to ~/.config/worldclock-tty/config.json). Use IANA timezone names (e.g. America/Chicago, Europe/Paris).

worldclock-tty add America/Chicago       # add a timezone
worldclock-tty remove America/Chicago    # remove a timezone
worldclock-tty list                      # show configured timezones
worldclock-tty reset                     # restore built-in defaults

Default timezones

America/Buenos_Aires, America/Caracas, America/La_Paz, America/Lima, America/Los_Angeles, America/Montevideo, America/New_York, America/Sao_Paulo, Asia/Bangkok, Asia/Dubai, Asia/Hong_Kong, Asia/Istanbul, Asia/Tokyo, Asia/Vladivostok, Atlantic/Bermuda, Atlantic/Canary, Australia/Sydney, Europe/London, Europe/Madrid, Europe/Moscow, Europe/Rome, Pacific/Honolulu.

Requirements

Python 3.10+

License

MIT

Metadata

Release files for worldclock-tty 0.6.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for worldclock-tty 0.6.7
File Size Uploaded Provenance
worldclock_tty-0.6.7.tar.gz 19.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for worldclock-tty 0.6.7
File Interpreter ABI Platform
worldclock_tty-0.6.7-py3-none-any.whl Python 3 none any Details

Total release size: 31.4 kB

Release files / worldclock_tty-0.6.7.tar.gz

Download URL worldclock_tty-0.6.7.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
efaf8ceff8fccf097ac90ea707ad419092265e3148f49fabe2e71da0171ce813
BLAKE2b-256 checksum
How to use checksums
3693260acf91665a73a4a26088e390d4ef19282eb58b47f9f10ec52ef281a33f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / worldclock_tty-0.6.7-py3-none-any.whl

Download URL worldclock_tty-0.6.7-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d97884ebec48985a8e1cfdb7d9523a031c760066ab645f27f731487611b4c6ff
BLAKE2b-256 checksum
How to use checksums
0a1531e745c6095d23aec801d0f4475eb1350ee00d57dc8d6a57bddc2a98cfe4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Security for worldclock-tty 0.6.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for worldclock_tty-0.6.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page