tz

Timezone conversion CLI
Install
Download the latest release for your architecture.
Usage
$ tz $(date)
America/Chicago Tue Feb 13 13:09:57 CST 2024
UTC Tue Feb 13 19:09:57 UTC 2024
You can also pass now instead of a timestamp:
$ tz now
America/Chicago Tue Feb 13 13:09:57 CST 2024
UTC Tue Feb 13 19:09:57 UTC 2024
tz reads the TZ=America/Chicago environmental variable too and supports multiple output timezones.
$ tz -to America/New_York,America/Belize $(date)
America/Belize Tue Feb 13 11:26:21 CST 2024
America/Chicago Tue Feb 13 11:26:21 CST 2024
America/New_York Tue Feb 13 12:26:21 EST 2024
UTC Tue Feb 13 17:26:21 UTC 2024
You can specify output formats using the -format flag. Common aliases include rfc3339, iso, and iso8601 for RFC3339 format. See -help for a full list of supported format aliases.
- 64-bit Linux (Ubuntu, Debian), macOS, and Windows
License
Apache License 2.0 - See LICENSE for details.