Terminal World Clock

I needed a multi-clock to know how to send my emails and stuff, and those desktop apps are so heavy that I script a clean one in shell.

this code is relative to the France Timezone (and must be updated when toggling between summer/winter time)

date -v-9H "+Cali : %Y/%m/%d %a — %I:%M %p"
date -v-6H "+New York : %Y/%m/%d %a — %I:%M %p"
date "+Toulouse : %Y/%m/%d %a — %I:%M %p"
date -v+5H "+BKK : %Y/%m/%d %a — %I:%M %p"
date -v+6H "+Beijing : %Y/%m/%d %a — %I:%M %p"
date -v+7H "+Tokyo : %Y/%m/%d %a — %I:%M %p"

but this one uses “locations” to determine the time (you’ll have to add the TZ=France or something to have the french time)

TZ=US/Pacific date "+Cali : %Y/%m/%d %a — %I:%M %p"
TZ=US/Eastern date "+New York : %Y/%m/%d %a — %I:%M %p"
date "+Toulouse : %Y/%m/%d %a — %I:%M %p"
TZ=Asia/Bangkok date "+BKK : %Y/%m/%d %a — %I:%M %p"
TZ=Asia/Chongqing date "+Beijing : %Y/%m/%d %a — %I:%M %p"
TZ=Japan date "+Tokyo : %Y/%m/%d %a — %I:%M %p"

Advertisements