Last active
June 5, 2021 16:48
-
-
Save 7171u/cb709f4b3e746ec8f984bff6639900e0 to your computer and use it in GitHub Desktop.
List Timezones Using Bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for tz in Asia/Kolkata US/Eastern Europe/Berlin Asia/Dubai Asia/Singapore Australia/Sydney; do | |
echo -en "\n$tz " | |
for i in $(seq -f %02g 0 23); do | |
echo -n $(TZ=":${tz}" date --date="TZ=\"Asia/Kolkata\" ${i}00" +%H:%M )" " | |
done | |
echo "" | |
done | column -s " " -t 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output:
