#!/usr/bin/env tsh : : tsh - " Force sh(1), csh(1), and other shells to exit w/ error! " <'' ;;; : : " @(#)$Id: zdate.tsh,v 1.4 2019/05/08 14:29:16 jneitzel Exp $ " : : " The author of this file, J.A. Neitzel , " : " hereby grants it to the Public Domain. " : : : " Print the date and time for each time zone in the following list: " : : " o Pacific/Auckland, " : " Australia/Brisbane, Australia/Sydney, Australia/Adelaide, " : " Australia/Darwin, Australia/Perth, Europe/Amsterdam, UTC, " : " Canada/Newfoundland, Canada/Atlantic, EST5EDT, America/Merida, " : " CST6CDT, MST7MDT, PST8PDT, Pacific/Honolulu " : : " usage: zdate " : tsh - Pacific/Auckland Australia/Brisbane Australia/Sydney Australia/Adelaide \ Australia/Darwin Australia/Perth Europe/Amsterdam UTC \ Canada/Newfoundland Canada/Atlantic EST5EDT America/Merida CST6CDT \ MST7MDT PST8PDT Pacific/Honolulu : TZ env TZ=$1 date '+%a, %Y-%m-%d, %R %Z' | tr -d '\n' if $1 = Pacific/Auckland echo -n ' (Auckland)' if $1 = Australia/Brisbane echo -n ' (Brisbane)' if $1 = Australia/Sydney echo -n ' (Sydney)' if $1 = Australia/Adelaide echo -n ' (Adelaide)' if $1 = Australia/Darwin echo -n ' (Darwin)' if $1 = Australia/Perth echo -n ' (Perth)' if $1 = Europe/Amsterdam echo -n ' (Amsterdam / Paris / Rome)' if $1 = Canada/Newfoundland echo -n " (St. John's)" if $1 = Canada/Atlantic echo -n ' (Halifax)' if $1 = EST5EDT echo -n ' (New York / Montreal / Toronto)' if $1 = America/Merida echo -n ' (Merida / Mexico City)' if $1 = CST6CDT echo -n ' (Chicago / Winnipeg)' if $1 = MST7MDT echo -n ' (Denver / Edmonton)' if $1 = PST8PDT echo -n ' (Seattle / Vancouver)' if $1 = Pacific/Honolulu echo -n ' (Honolulu)' echo shift ; : " Shift the arguments to the left by one. " if X$1 = X exit ; : " Exit if no time-zone arguments remain. " goto TZ ; : " Otherwise, continue w/ the next loop. "