Skip to content

Instantly share code, notes, and snippets.

@luckylittle
Last active July 27, 2023 05:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luckylittle/fe713d77022c399986bce8c236612de8 to your computer and use it in GitHub Desktop.
Save luckylittle/fe713d77022c399986bce8c236612de8 to your computer and use it in GitHub Desktop.
Quick & Easy way to display various timezones within your shell
#!/bin/bash
echo "----------------------------"
echo "Local Time"
date
echo "----------------------------"
echo ""
echo "Time in Los Angeles, CA"
export TZ=America/Los_Angeles
date
echo ""
echo "Time in San Francisco, CA"
export TZ=US/Pacific
date
echo ""
echo "Time in Dallas, TX"
export TZ=US/Central
date
echo ""
echo "Time in New York, NY"
export TZ=America/New_York
date
echo ""
echo "^"
echo "|"
echo "|"
echo "----------------------------"
echo "Time in UTC"
export TZ=UTC
date
echo "----------------------------"
echo "|"
echo "|"
echo "v"
echo ""
echo "Time in Prague, CZ"
export TZ=Europe/Prague
date
echo ""
echo "Time in Mumbai, IN"
export TZ=Asia/Calcutta
date
echo ""
echo "Time in Singapore"
export TZ=Asia/Singapore
date
echo ""
echo "Time in Perth, WA"
export TZ=Australia/Perth
date
echo ""
echo "Time in Melbourne, VIC"
export TZ=Australia/Melbourne
date
echo ""
echo "Time in Sydney, NSW"
export TZ=Australia/Sydney
date
echo ""
echo "Time in Auckland, NZ"
export TZ=Pacific/Auckland
date
echo ""
unset TZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment