Skip to content

Instantly share code, notes, and snippets.

@msudgh
Created June 25, 2019 11:49
Show Gist options
  • Save msudgh/31e5f1e32615741f2c11258e197aab81 to your computer and use it in GitHub Desktop.
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