Skip to content

Instantly share code, notes, and snippets.

@msudgh
Created June 25, 2019 11:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save msudgh/31e5f1e32615741f2c11258e197aab81 to your computer and use it in GitHub Desktop.
#!/bin/bash
list_of_tz=(America/New_York Asia/Tehran Europe/Malta Europe/Mardrid Asia/Kolkata Europe/Vilnius)
RED=$(tput setaf 1) GREEN=$(tput setaf 2)
for i in ${list_of_tz[@]}; do
timezone="${GREEN}${i}:"
date="$RED $(TZ=$i date)"
echo $timezone $date
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment