summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2010-04-21 21:21:54 +1200
committerLars Wirzenius <liw@liw.fi>2010-04-21 21:21:54 +1200
commit320326a8e890f74cc73f24f824733a97821b04df (patch)
tree3fc555487c28140cc8d5695906a0f04f804bc9bd
parent3798ad8f827a3dadeb803b0c4bc06179ae90fd95 (diff)
downloadliw-automation-320326a8e890f74cc73f24f824733a97821b04df.tar.gz
Add world-dates.
-rw-r--r--debian/changelog6
-rw-r--r--debian/liw-automation.install1
-rwxr-xr-xworld-dates27
3 files changed, 34 insertions, 0 deletions
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 <liw@liw.fi> 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