#!/bin/bash

time_zones=(
  Pacific/Honolulu
  America/Los_Angeles
  America/Phoenix
  America/Denver
  America/Chicago
  America/New_York
  Europe/London
  Europe/Berlin
  Europe/Helsinki
  Europe/Moscow
  Asia/Bangkok
  Asia/Singapore
  Asia/Shanghai
  Asia/Seoul
  Asia/Tokyo
)

# https://unix.stackexchange.com/a/111565
should_highlight() {
  word=$1
  case $word in
    America/Los_Angeles|America/Chicago|Asia/Tokyo) return 0;;
    *) return 1;;
  esac
}

for tz in "${time_zones[@]}" ; do
  if should_highlight $tz ; then
    echo -n "[1;32m"
  fi
  printf "%20s " $tz
  env TZ=$tz date +"%a %F %T %Z"
  echo -n "[0m"
done
