summary refs log tree commit diff
path: root/worldclock
diff options
context:
space:
mode:
Diffstat (limited to 'worldclock')
-rwxr-xr-xworldclock18
1 files changed, 18 insertions, 0 deletions
diff --git a/worldclock b/worldclock
new file mode 100755
index 0000000..57c6926
--- /dev/null
+++ b/worldclock
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+ZONES="America/Los_Angeles UTC Europe/London Europe/Berlin Asia/Kuala_Lumpur Asia/Singapore unix"
+
+while :
+do
+    clear
+	echo
+    for TZ in $ZONES ; do
+        if [ $TZ = "unix" ] ; then
+            TIME=$( date +%s )
+        else
+            TIME=$( date )
+        fi
+        echo -e $TIME "\t" $TZ
+    done
+    sleep 1
+done