#!/bin/bash # usage: ztime # will print time in UT, Amsterdam, Israel, India, Tokyo HELP=; while getopts h optval do case $optval in h) HELP=1;; esac done if [ $HELP ]; then echo "usage: ztime" echo " will print time in UT and locations around the world" exit fi #------------------------------------------------------------------------ echo "UT Time:" $(date -u) zdump Asia/Tokyo | awk '{printf("Tokyo: %3s %3s %2s %0.5s\n",$2,$3,$4,$5)}' zdump Asia/Kolkata | awk '{printf("India: %3s %3s %2s %0.5s\n",$2,$3,$4,$5)}' zdump Europe/Moscow | awk '{printf("Moscow: %3s %3s %2s %0.5s\n",$2,$3,$4,$5)}' zdump Israel | awk '{printf("Israel: %3s %3s %2s %0.5s\n",$2,$3,$4,$5)}' zdump Europe/Amsterdam | awk '{printf("Amsterdam: %3s %3s %2s %0.5s\n",$2,$3,$4,$5)}' zdump America/Los_Angeles | awk '{printf("LA: %3s %3s %2s %0.5s\n",$2,$3,$4,$5)}' zdump Pacific/Honolulu | awk '{printf("Hilo: %3s %3s %2s %0.5s\n",$2,$3,$4,$5)}'