Skip to content

Instantly share code, notes, and snippets.

@michiel
Created Jun 6, 2018
Embed
What would you like to do?
terminal world clock
#!/bin/bash
function clock() {
clear
TZ=US/Pacific date "+LA : %Y/%m/%d %a — %I:%M %p"
TZ=US/Eastern date "+New York : %Y/%m/%d %a — %I:%M %p"
TZ=Europe/Amsterdam date "+Amsterdam : %Y/%m/%d %a — %I:%M %p"
TZ=Asia/Bangkok date "+Bangkok : %Y/%m/%d %a — %I:%M %p"
TZ=Japan date "+Tokyo : %Y/%m/%d %a — %I:%M %p"
TZ=Australia/Melbourne date "+Melbourne : %Y/%m/%d %a — %I:%M %p"
}
while true;
do
clock;
sleep 30;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment