summaryrefslogtreecommitdiff
path: root/scripts/world-dates
blob: c6793e6208de7c28e80beaecb87579a23c093b5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

timezones="
    US/Pacific 
    Europe/London
    UTC
    Europe/Helsinki 
    Asia/Tokyo 
    Australia/Brisbane
    Pacific/Auckland
    "

w=0
for tz in $timezones
do
    len=$(echo -n $tz | wc -c)
    if [ $len -gt $w ]
    then
        w=$len
    fi
done

for tz in $timezones
do
    printf "%${w}s -- %s\n" $tz \
        "$(LC_ALL=C TZ=$tz date +'%a %Y-%m-%d %H:%M')"
done