Skip to main content

Is there a way ( via a policy or MCX ) to force the date and time to sync to time.apple.com for managed computers?



I looked through the MCX templates and didn't see anything.



Anyone try to do this before?

You can run do this via shell script. There are just a few commands that you need:



systemsetup -setusingnetworktime on # this confirms that network time service is turned on
systemsetup -setnetworktimeserver time.apple.com # this sets the time server



and



ntpdate -u time.apple.com # this is the one that actually tells the date function to check in with the time server



I found that sometimes the timezone placeholder (/etc/localtime) gets corrupt for some reason. You can reset the time zone with...



systemsetup -settimezone America/New_York # sets timezone to ET



I hope this helps.



Wayne


sudo systemsetup setusingnetworktime on


will set it to On. Just run that in a policy. There may be an MCX or profile function, but not sure.



Edit: Wayne beat me to it, and provided more info. So follow his post. :)


You can also do this via MCX:



Domain: com.apple.MCX
Key Name: timeServer
Key Type: string
Value: time.apple.com


Reply