-
-
Save nick-desteffen/1126771 to your computer and use it in GitHub Desktop.
sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime |
Does removing the link revert it back?
@j-walker23 just setting it in the system preferences updates the symlink, I verified it.
@deepeeess Thanks for the response! I was looking for a easy progrmatic way to flip back and forth. Which I'm sure there is.
life saver
Perfect, thanks !!!
Works for macOS Mojave Verison 10.14.6 (18G103). Thanks
I verified that selecting UTC - United Kingdom
in the Date & Time panel on macOS 10.14.6 really does set it to UTC and not to UK time, which could be UTC+1 during daylight savings.
Hi all! I am having issues with meeting invites from my client in Dubai and I live in UK. While the invite says 4PM AST (Arabian Standard Time) is shows up at 2PM UK time, but should be 1PM UK time. Any fix you can suggest?
works on MacOs Mojave thanks !
any tip to revert this (in case i need to in the future)
Command To See What Your Local Time Is Currently Set To:
[$]> ls -la /etc/localtime
/etc/localtime -> /var/db/timezone/zoneinfo/America/Los_Angeles
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
/etc/localtime -> /var/db/timezone/zoneinfo/UTC
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
TZif2UTCTZif2UTC
UTC0
TZif2UTCTZif2UTC
UTC0
I created the following shell aliases to make switching timezones easy.
# output the current timezone
alias timezone.current='exa -l /etc/localtime'
# set the timezone to my default local timezone
alias timezone.default='sudo ln -sf /var/db/timezone/zoneinfo/America/Los_Angeles /etc/localtime'
# set the timezone to utc
alias timezone.utc='sudo ln -sf /var/db/timezone/zoneinfo/UTC /etc/localtime'
There is also
sudo systemsetup -settimezone GMT
.Not sure what difference it makes …