Page MenuHomePhabricator
Paste P16286

world-dates
ActivePublic

Authored by brennen on Jun 3 2021, 11:16 PM.
Tags
None
Referenced Files
F34479817: world-dates
Jun 3 2021, 11:16 PM
Subscribers
None
#!/bin/sh
# from lars wirzenius at:
# http://git.liw.fi/liw-automation/plain/scripts/world-dates
timezones="
US/Pacific
US/Mountain
US/Eastern
Europe/London
UTC
Europe/Madrid
Europe/Paris
Europe/Zagreb
Europe/Prague
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