summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBrian Picciano <me@mediocregopher.com>2023-11-13 11:32:11 +0100
committerBrian Picciano <me@mediocregopher.com>2023-11-13 11:32:11 +0100
commitf22cf5df6ddbccf5963e037444a82596070873de (patch)
tree18220ba2e2b55bdee336cca82ed53acc9aa23e27 /bin
parent95bae8af09e85f9d4400dcc70e70218f6cb8970b (diff)
Add worldclock script and bind it to cmd+a
Diffstat (limited to 'bin')
-rwxr-xr-xbin/worldclock16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/worldclock b/bin/worldclock
new file mode 100755
index 0000000..20e78f2
--- /dev/null
+++ b/bin/worldclock
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+function line {
+ label="$1"
+ tz="$2"
+ d="$(TZ="$tz" date "+%Y-%m-%d %H:%M:%S %Z (%z)")"
+ printf "%s\t%s\n" "$label" "$d"
+}
+
+line "Sydney" "Australia/Sydney"
+line "Tokyo" "Asia/Tokyo"
+line "Rome" "Europe/Rome"
+line "UTC" "UTC"
+line "London" "Europe/London"
+line "NY" "America/New_York"
+line "LA" "America/Los_Angeles"