Created
November 16, 2023 23:06
-
-
Save adeekshith/ac1a5755b4d022597b4d51861e1d3f57 to your computer and use it in GitHub Desktop.
WorldTime - Show time in different timezones in the commandline
This file contains 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
#!/bin/bash | |
echo "UTC: $(TZ='UTC' date +'%H:%M %Y-%m-%d %a')" | |
echo "-------------------------" | |
echo "EST: $(TZ='America/New_York' date +'%H:%M %Y-%m-%d %a')" | |
echo "CST: $(TZ='America/Chicago' date +'%H:%M %Y-%m-%d %a')" | |
echo "PST: $(TZ='America/Los_Angeles' date +'%H:%M %Y-%m-%d %a')" | |
echo "-------------------------" | |
echo "IST: $(TZ='Asia/Kolkata' date +'%H:%M %Y-%m-%d %a')" | |
# Ref: Timezone abbreviations: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment