1
0
Fork
You've already forked timebuddy
0
a terminal world clock and time zone converter
  • Python 100%
2026年06月01日 19:12:14 -04:00
.gitignore Initial commit 2026年06月01日 04:17:09 +02:00
LICENSE Initial commit 2026年06月01日 04:17:09 +02:00
README.md platform specific dependency 2026年06月01日 05:15:54 +02:00
timebuddy.py vertical layout support via -v flag 2026年06月01日 19:12:14 -04:00

timebuddy

a terminal world clock and timezone converter inspired by World Time Buddy.

It displays a horizontal hour grid across multiple time zones and can convert specific dates, times, or ranges directly from the command line.

how to use

to use just drop the script in the $PATH and call with one of the args, which are listed in this friendly help message:

% timebuddy --help
usage: timebuddy [-h] [--tz TZ [TZ ...]] [--date [DATE ...]]
 [--date-tz DATE_TZ]
a terminal world clock and time zone converter
options:
 -h, --help show this help message and exit
 --tz TZ [TZ ...] IANA time zones to list
 --date [DATE ...] 0 args = today, 1 = focus, 2 = range
 --date-tz DATE_TZ Timezone to interpret naive --date values

UTC and the system local timezone are always shown by default. But the script is super hackable, be free to adjust defaults to your liking.

relies on tzdata package, so before running it is recommended running pip install tzdata, unless running on Linux.

concepts

timebuddy uses IANA time zones. A convenient list of IANA time zones can be found on Wikipedia.

without --date, timebuddy shows the table for the current day.

with --date:

  • one date: full day
  • one datetime: single hour
  • two values: range

--date-tz can also specify time zone in the --date flag (by default it is using local tz).

examples

today

% timebuddy --tz Europe/Berlin
UTC [UTC ] 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 00 01
Local [EDT ] 22 23 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21
Berlin [CEST] 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 00 01 02 03

multiple zones

% timebuddy --tz US/Arizona Africa/Dakar Asia/Tokyo
UTC [UTC] 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 00 01
Local [EDT] 22 23 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21
Arizona [MST] 19 20 21 22 23 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18
Dakar [GMT] 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 00 01
Tokyo [JST] 11 12 13 14 15 16 17 18 19 20 21 22 23 00 01 02 03 04 05 06 07 08 09 10

date conversion

% timebuddy --tz US/Mountain Europe/Istanbul Asia/Novosibirsk --date 4159年03月01日
UTC [UTC] 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 00 01 02 03
Local [EDT] 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Mountain [MST] 21 22 23 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
Istanbul [+03] 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 00 01 02 03 04 05 06
Novosibirsk [+07] 11 12 13 14 15 16 17 18 19 20 21 22 23 00 01 02 03 04 05 06 07 08 09 10

timestamp conversion

% timebuddy --tz Asia/Ulaanbaatar America/Rio_Branco --date 1970年01月01日T12:30
UTC [UTC] 16
Local [EDT] 12
Ulaanbaatar [+07] 23
Rio Branco [-05] 11

time range conversion

% timebuddy --tz Europe/Athens Egypt --date 2000年04月12日T10:00 2000年04月12日T15:00
UTC [UTC ] 14 15 16 17 18 19
Local [EDT ] 10 11 12 13 14 15
Athens [EEST] 17 18 19 20 21 22
Egypt [EET ] 16 17 18 19 20 21

different zone for the --date

% timebuddy --tz Europe/Sofia --date 2000年04月12日T10:00 --date-tz America/Anchorage
UTC [UTC ] 18
Local [EDT ] 14
Sofia [EEST] 21