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 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
| 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/localtimeCommand To Set Your Local Time To UTC
[$]> sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtimeNOTE: When I Set It To
UTC - United KingdomVia System Preferences It Becomes:[$]> ls -la /etc/localtimeCommand To Switch Your Local Time Back To The Original Time Zone
[$]> sudo ln -sf /var/db/timezone/zoneinfo/America/Los_Angeles /etc/localtimeFYI: I Compared Both Of The UTC Files And They Are Exactly Matching
[$]> delta /usr/share/zoneinfo/UTC /var/db/timezone/zoneinfo/UTCor
[$]> diff /usr/share/zoneinfo/UTC /var/db/timezone/zoneinfo/UTC[$]> cat /usr/share/zoneinfo/UTC /var/db/timezone/zoneinfo/UTCI created the following shell aliases to make switching timezones easy.