Skip to main content
Solved

Set Time Zone

  • May 4, 2016
  • 7 replies
  • 51 views

Forum|alt.badge.img+3

Anyone have a good way of setting the time zone up correctly?

I have tried using the time zone script on the jamf forums, however we are still seeing issues with the time being up to 5 minutes off. Is there a way to enable the automatically detect time zone setting while also enabling locations services to allow this to happen?

Best answer by davidacland

Not sure if it helps but we normally use:

/usr/sbin/systemsetup -settimezone "Europe/London"
/usr/sbin/systemsetup -setusingnetworktime on

7 replies

Forum|alt.badge.img+16
  • Valued Contributor
  • May 4, 2016

On 10.11 at least to manually set a time zone it's along the lines of.
systemsetup -listtimezones
systemsetup -settimezone Pacific/Auckland

Has worked for us, plus an ntp call to actually set the time after changing the time zone.


davidacland
Forum|alt.badge.img+18
  • Valued Contributor
  • Answer
  • May 4, 2016

Not sure if it helps but we normally use:

/usr/sbin/systemsetup -settimezone "Europe/London"
/usr/sbin/systemsetup -setusingnetworktime on

Forum|alt.badge.img+12
  • Contributor
  • May 4, 2016

Is this what you require?

Jamf Post #6835


talkingmoose
Forum|alt.badge.img+36
  • Community Manager
  • May 4, 2016

If you're seeing a small drift of a few minutes, then the time zone setting is not your solution. That will only take care of setting your Mac to one of the 24 world time zones. You may not be connecting to your preferred NTP time server.

Have you verified your Macs are able to communicate with time.apple.com? Some networks may block access. If they're able to communicate then try "turning it off and on again" using a script. Something like:

systemsetup -setusingnetworktime off
systemsetup -setusingnetworktime on

I've found that works but may not reflect on the login window if no user is logged in. But once you log in, the clock appears correctly

JAMF Nation also has a time server script you may find useful.

https://jamfnation.jamfsoftware.com/viewProductFile.html?fid=854


Forum|alt.badge.img+7
  • Valued Contributor
  • May 6, 2016

i also like to throw a manual update command at the bottom

update Time

/usr/sbin/ntpdate -u 10.x.x.x

or whatever the ipaddress of your time server is


Forum|alt.badge.img+10
  • Valued Contributor
  • April 20, 2023

Not sure if it helps but we normally use:

/usr/sbin/systemsetup -settimezone "Europe/London"
/usr/sbin/systemsetup -setusingnetworktime on

For some time now the command

/usr/sbin/systemsetup -settimezone "Europe/London"

throws an error, any ideas on that?

 

systemsetup[2646:119258] ### Error:-99 File:/AppleInternal/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/Admin/InternetServices.m Line:379

 


Forum|alt.badge.img+10
  • Valued Contributor
  • April 20, 2023

Not sure if it helps but we normally use:

/usr/sbin/systemsetup -settimezone "Europe/London"
/usr/sbin/systemsetup -setusingnetworktime on

 

systemsetup -settimezone Europe/Berlin

 

throws following error but nevertheless seems to set the timezone:

 

systemsetup[2799:138423] ### Error:-99 File:/AppleInternal/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/Admin/InternetServices.m Line:379 Set TimeZone: Europe/Berlin

 

Any ideas on how to get rid of the error?