From 320326a8e890f74cc73f24f824733a97821b04df Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 21 Apr 2010 21:21:54 +1200 Subject: Add world-dates. --- debian/changelog | 6 ++++++ debian/liw-automation.install | 1 + world-dates | 27 +++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100755 world-dates diff --git a/debian/changelog b/debian/changelog index 8675c6d..bc5dacb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +liw-automation (4) squeeze; urgency=low + + * Add world-dates. + + -- Lars Wirzenius Wed, 21 Apr 2010 21:21:35 +1200 + liw-automation (3) squeeze; urgency=low * Add build-journal and journal-note. diff --git a/debian/liw-automation.install b/debian/liw-automation.install index 8d4ed04..8537c89 100644 --- a/debian/liw-automation.install +++ b/debian/liw-automation.install @@ -2,3 +2,4 @@ sync-to-pieni usr/bin g usr/bin build-journal usr/bin journal-note usr/bin +world-dates usr/bin 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 -- cgit v1.2.1