Skip to content

Instantly share code, notes, and snippets.

@oz
Created April 3, 2013 03:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save oz/5298193 to your computer and use it in GitHub Desktop.
Save oz/5298193 to your computer and use it in GitHub Desktop.
The awesome world clock
#!/bin/sh
time_here=`date`
export TZ='UTC'
utc_time=`date`
export TZ='Europe/Berlin'
time_in_germany=`date`
export TZ='Europe/Paris'
time_in_france=`date`
export TZ='America/New_York'
time_in_ny=`date`
export TZ='America/Mexico_City'
time_in_mexico=`date`
export TZ='America/Los_Angeles'
time_in_sf=`date`
export TZ='Asia/Tokyo'
time_in_tokyo=`date`
echo 'Awesome world clock:'
echo
echo "Local time: $time_here"
echo "UTC: $utc_time"
echo
echo "San Francisco: $time_in_sf"
echo "Mexico: $time_in_mexico"
echo "New-York: $time_in_ny"
echo "Paris: $time_in_france"
echo "Berlin: $time_in_germany"
echo "Tokyo: $time_in_tokyo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment