diff options
Diffstat (limited to 'world-dates')
-rwxr-xr-x | world-dates | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/world-dates b/world-dates new file mode 100755 index 0000000..c6793e6 --- /dev/null +++ b/world-dates @@ -0,0 +1,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 |