Time in GMT or Missing Time Zones in systemsetup
-
30-05-2021 - |
题
The problem
MacBook Pro (Catalina 10.15.7
) decided to start showing GMT in the status bar and system preferences last week. It is physically in Pacific time (PST) and I'd like it to show that time instead.
Troubleshooting thus far
Following Apple instructions
- System Preferences > Date & Time:
- "Set date and time automatically" is turned on using
Apple Americas/U.S. (time.apple.com.)
(problem persists with all servers) - "Set time zone automatically using current location` is turned on
- Time Zone correctly locates me in PST
- Time Zone listing is empty
- Privacy settings are turned on to allow location services for
Time Zone & System Customizations
- "Set date and time automatically" is turned on using
- Computer has been restarted several times
- PRAM has been reset several times
- Computer is connected to wifi
Following this post:
localtime
is correct as are link to database and permissionsAccessibility
has been resetntpdate
has been run
Current situation
(Really, more of "The Problem" but with a lot of the basic troubleshooting out of the way. Maybe this is "where it gets good".)
date
returns the correct (local) timesystemsetup gettimezone
returnsGMT
systemsetup listtimezones
returnsTime Zones:
and nothing elsesystemsetup settimezone America/Los_Angeles
returnsAmerica/Los_Angeles is not a valid timezone
Did the timezone list somehow go missing? Can I add it manually? Is there an update I can run to re-link this somehow?
I'd like to resolve this without an OS re-install if I can. Help me Ask Different, you're my only hope.
解决方案
I didn’t have to “fix anything” so this isn’t super satisfying as an answer, but the problem has resolved itself. I see no updates that would have affected this and took no further action.
其他提示
I waited about a week, but the issue persisted. I began to have issues with Calendar.app wherein some events were reported correctly (but in GMT) and some events were reported incorrectly (as if my timezone was restored to Eastern Time).
My most recent tz folder was 2021a.1.0:
# ls -rt /private/var/db/timezone/tz/ | tail -n 1
2021a.1.0
My next most recent tz folder was:
# ls -rt /private/var/db/timezone/tz/ | tail -n 2 | head -n 1
2020f.1.0
Following @armiller's suggestion, I was able to fix my Mac by running this in Terminal.app:
broken=$(ls -rt /private/var/db/timezone/tz/ | tail -n 1)
previous=$(ls -rt /private/var/db/timezone/tz/ | tail -n 2 | head -n 1)
cd /private/var/db/timezone/tz
sudo mv $broken/icutz/icutz44l.dat $broken/icutz/icutz44l.dat.bak
sudo cp $previous/icutz/icutz44l.dat $broken/icutz/icutz44l.dat
I then opened the Timezone selector in System Preferences. Now the timezone is set to a real value. My Calendar uses the correct time. Unfortunately, the clock in the menu bar was still wrong. Restarting the OS fixed the clock in the menu bar.
I was experiencing this same problem after updating to 10.15.7. The fix for me was copying the old /private/var/db/timezone/tz/2020a.1.0/icutz/ictuz44l.dat
to the new /private/var/db/timezone/tz/2020d.1.0/icutz
directory. Make sure you backup the 2020d.1.0 version before replacing. After the copy is complete, restart the timed service.
The new version must have been corrupted somehow.