Created
August 5, 2011 01:50
-
-
Save nick-desteffen/1126771 to your computer and use it in GitHub Desktop.
Set Time zone in OSX to UTC
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
sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Command To See What Your Local Time Is Currently Set To:
[$]> ls -la /etc/localtime
Command To Set Your Local Time To UTC
[$]> sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime
NOTE: When I Set It To
UTC - United Kingdom
Via System Preferences It Becomes:[$]> ls -la /etc/localtime
Command To Switch Your Local Time Back To The Original Time Zone
[$]> sudo ln -sf /var/db/timezone/zoneinfo/America/Los_Angeles /etc/localtime
FYI: I Compared Both Of The UTC Files And They Are Exactly Matching
[$]> delta /usr/share/zoneinfo/UTC /var/db/timezone/zoneinfo/UTC
or
[$]> diff /usr/share/zoneinfo/UTC /var/db/timezone/zoneinfo/UTC
[$]> cat /usr/share/zoneinfo/UTC /var/db/timezone/zoneinfo/UTC
I created the following shell aliases to make switching timezones easy.