A fast timezone converter for the command line and Alfred. Supports timezone abbreviations, city names, country names, and automatic daylight saving time handling.
Make the script executable and symlink it into your PATH:
chmod +x tz
ln -s "$(pwd)/tz" /usr/local/bin/tzRequires Python 3.9+ (uses zoneinfo from the standard library — no dependencies).
Double-click Timezone-Converter.alfredworkflow to install. Trigger with the tz keyword.
tz <time> <from> <to> [date]
| Format | Example |
|---|---|
| 12h | 08:30AM, 6:30PM |
| 12h short | 3PM, 8AM |
| 24h | 20:00, 14:30 |
| Type | Examples |
|---|---|
| Abbreviation | ET, PT, CET, GMT, JST |
| City code | LA, SF, NY, NYC |
| City name | London, Tokyo, "Los Angeles" |
| Country | Germany, Japan, India |
| IANA | America/New_York, Europe/Berlin |
The to keyword between zones is optional.
Append a date to convert for a specific day (affects DST calculation):
| Format | Example |
|---|---|
YYYY/MM/DD |
2025/12/31 |
YYYY-MM-DD |
2025-12-31 |
DD/MM/YYYY |
31/12/2025 |
DD.MM.YYYY |
31.12.2025 |
Without a date, today is used.
# Basic timezone abbreviations
tz 08:30AM ET CET
tz 20:00 ET GMT
tz 06:30PM PST CET
# City codes
tz 08:30AM LA NY
tz 3PM SF Tokyo
# City and country names
tz 08:30AM LA to Germany
tz 3PM London Tokyo
# With a specific date (DST-aware)
tz 08:30AM LA to Germany 2025/12/31
# Short time format
tz 3PM UTC Japan 8:30 AM EDT → 2:30 PM CEST
ET (-04:00) → CET (+02:00) · +6h
Tuesday, March 31, 2026
When the conversion crosses a day boundary:
3:00 PM PDT → 7:00 AM JST (next day)
LA (-07:00) → Tokyo (+09:00) · +16h
Tue, Mar 31 → Wed, Apr 01, 2026
The CLI output is colorized in terminals and automatically plain when piped. Set NO_COLOR=1 to disable colors.
Type tz followed by your query. Results update live as you type.
- ⏎ Enter — copy the converted time (e.g.
2:30 PM CEST) - ⌥ Enter — copy in 24h format (e.g.
14:30 CEST)
Day changes are flagged with a ⚠ warning row.
tz CLI tool (standalone, no imports)
tz_core.py Shared conversion logic (used by Alfred)
tz-alfred.alfredworkflow/ Alfred workflow source
info.plist Workflow configuration
tz_alfred.py Script Filter (outputs Alfred JSON)
tz_core.py Bundled core module
icon.png Workflow icon
Timezone-Converter.alfredworkflow Installable workflow package