summaryrefslogtreecommitdiff
path: root/bin/worldclock
blob: 20e78f2814117589f70c93bfd074de2db8ddeca6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash

function line {
    label="$1"
    tz="$2"
    d="$(TZ="$tz" date "+%Y-%m-%d %H:%M:%S %Z (%z)")"
    printf "%s\t%s\n" "$label" "$d"
}

line "Sydney" "Australia/Sydney"
line "Tokyo" "Asia/Tokyo"
line "Rome" "Europe/Rome"
line "UTC" "UTC"
line "London" "Europe/London"
line "NY" "America/New_York"
line "LA" "America/Los_Angeles"