☰ Menu
CLI Open source 20 installs/mo

tz for Mac

tz

tz helps you schedule things across time zones. It's an interactive TUI program that displays time across the time zones of your choosing.

tz — overview

? A time zone helper

tz helps you schedule things across time zones. It's an interactive TUI program that displays time across the time zones of your choosing.

Usage

Run tz with no arguments to show the local time, as well as the UTC time zone. It gets more useful when you pass some time zones to the program, to list those below the local time zone.

For now, you need to select the time zones from the tz_data list. Yes, there are plans to make this friendlier for humans too. You're welcome to file an issue about it. I enjoy reading those.

If you would rather not type the list everytime, you could set an alias for your shell, or use the TZ_LIST environment variable with a semi-colon separated list of tz data zone names, or use a configuration file (see Configuration below).

Check out tz -h for other flags.

The program will adjust to light and dark terminals themes.

Installing

I provide linux/amd64 builds for "official" releases, and you can build from source for your favorite architecture. Kind souls have also packaged the program for other OSes.

Packages

Brew

Brew has a tz package: brew install tz

Archlinux

If you're an Archlinux user, packages are also available: tz follows releases and, tz-git builds the main git branch.

Go

Configuration

The tz program uses standard time zones as described here.

You can specify preferences through a configuration file, an environment variable, or as command arguments.

They are applied in this order, overriding at each subsequent step: Configuration file ~/.config/tz/conf.toml Environment variable TZ_LIST Command line arguments tz UTC

The local time zone is always displayed first.

Configuration File

Configs are read from $HOME/.config/tz/conf.toml.

Time zone ids should reference items from the standard tz database names. Alias them by providing your own name with the name key.

Sample configuration: example-conf.toml

Environment Variable

This method only supports setting time zones. Keymaps must be configured through the configuration file.

Specify time zones to display by setting the TZ_LIST environment variable. For example, to display your local time, the time in California, and the time Paris, set TZ_LIST to US/Pacific;Europe/Paris.

The TZ_LIST environment variable recognizes items from the standard tz database names, but you can alias these, using a special value: use the standard name followed by , and your alias. For example:

If adding this to a shell configuration, remember to export it:

Building

You need a recent-ish release of go with modules support:

Testing

Debug

Contributing

Please do file bugs, and feature requests. I am accepting patches too, those are the best, but please, open an issue first to discuss your changes. ?

License

The GPL3 license.

Copyright (c) 2021-2022 Arnaud Berthomier

Details

命令行时区可视化工具

How to install tz

  1. Open Terminal (press ⌘ + Space and type “Terminal”).
  2. If Homebrew is not installed yet, run the command below first.
  3. Run this command:

Latest 10 releases

Last updated 2025-02-14; current version v0.8.0, with the latest 10 releases listed.

VersionReleasedTypeSizemacOSWindowsLinux
v0.8.02025-02-14Stable1.3 MBDownloadDownloadDownload
v0.7.02024-01-10Stable1.8 MBDownloadDownloadDownload
v0.6.32023-01-16Stable1.7 MBDownloadDownloadDownload
v0.6.22022-12-02Stable———Download
v0.6.12021-10-14Stable———Download
v0.62021-10-14Stable———Download
v0.52021-04-01Stable———Download
v0.42021-03-16Stable———Download
v0.32021-03-04Stable———Download
v0.22021-02-13Stable———Download

Data from GitHub Releases; stable releases first, each group sorted newest first.

Prebuilt bottle platforms

Official Homebrew bottles cover:

  • Apple silicon · latest macOS
  • Apple silicon · macOS 26 Tahoe
  • Apple silicon · macOS 15 Sequoia
  • Apple silicon · macOS 14 Sonoma
  • Apple silicon · macOS 13 Ventura
  • Intel · macOS 14 Sonoma
  • Intel · macOS 13 Ventura
  • Linux · ARM64
  • Linux · x86_64

Compared with similar apps

Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.

Compared with similar apps
AppVersionLicenseArchitecture30-day installs
tzv0.8.0GPL-3.0-or-laterCLI20
azion4.24.0-dev.20MITCLI22
release-it21.1.2MITCLI32
openssl@4openssl-4.1.0Apache-2.0CLI494,798

Similar apps: Command-line Tools

Leave a comment

评论表单加载中…