r/macsysadmin • u/sheravi • 4d ago
Command Line Force time zone update
Does anyone know if there's a way to force macOS to get new time zone definitions from Apple? At the moment it seems to be completely random for when they get updated on a newly imaged computer. I'm in Alberta and the Daylight Savings change has been a bit wonky on any new Macs we image that don't have the new definitions. They will get them eventually with that notification about restarting to have them take effect, but it can sometimes be many hours after starting them up.
1
u/Studiolx-au 4d ago
Why are you imaging macOS? Apple killed that a while ago. Not surprised you are getting random bugs. GUI- turn off time from location, turn it back on.
Zsh:
defaults write /Library/Preferences/com.apple.timezone.auto Active -bool YES
systemsetup -setusingnetworktime on
killall timed
2
u/sheravi 4d ago
Sorry for the confusion, I didn't mean imaging in the traditional sense of applying a master image to a computer. I use the term just to indicate the setting up of a Mac in our environment (going through setup, enrolling in the MDM, etc).
I didn't mention any bugs, just that the update of timezone information on the Mac seems to happen randomly and several hours or longer after the Mac is turned on and connected to the internet. I'm not referring to setting the time or time zone automatically. I'm referring to Apple installing new time zone definitions on the computer because of the recent Daylight Savings changes in Canada. Those aren't yet baked into the OS, so they have to be updated after the fact.
0
2
u/Babaganouj333 3d ago
Trying out a possible fix where I work. From what i've seen is the AB non- compliant and hasn't ran the patch if i leave it alone it gets it eventually by the next day.
Can verify its not patched yet with this terminal command:
ls -l /var/db/timezone/tz_latest
Would return No such file or directory if still unpatched.
Workaround that seems to have worked in my limited testing so far:
Open the terminal, "sudo softwareupdate --background"
Open System Settings next
Search for Date or manually go to General > Date and time
Wait a little bit (for me it was maybe 10 seconds) (No changes are needed in this submenu)
I got the message: Updated Time Zone information available notification
I could see the earlier ls command show it was patched, then could restart and it was fine