TimeZone and SelfService Time Correction

hedenstam
New Contributor III

Hi,

TimeZone is an issue. During enrolment location services are enabled. System services are allowed to use Location services. Set time zone automatically using current location is enabled.
I get the "current location" right (in Finland), still Macs timezone is Pacific and Closest city is Cupertino CA.
How come I am not getting the right zone after enrolment and how to fix? Any ideas?

Then I have question if there is a way to correct time/date with a script or something like that in SelfService. If the Mac drains the battery the date/time can be reset to Jan 01 etc,,, so I was thinking that could I have selfservice app that users could run to correct the date and time. Home Internet etc... would not mind the wrong date/time, but corporate network do care about correct time or within tolerated timeframe, which is minutes, not months/years.... ;) I have tried sudo ntpdate -u time.apple.com, but that does not the trick for me.

2 REPLIES 2

jared_f
Valued Contributor
sudo ntpdate -u time.apple.com

Nix4Life
Valued Contributor

@hedenstam Search the forum. Someone put together a script that will poll the machine and set the time based off of Xprotect or Gatekeeper. I believe it was made for self-service. Another option would be a script that sets it at provisioning or could be made int a self service script.
we set the ntp.conf file as part of a setup/firstboot based on a discussion a few years back here

#set network time server with fail over to apple-us
sudo systemsetup -settimezone  YourCountry/City
sudo systemsetup -setusingnetworktime  off
/bin/cat > /etc/ntp.conf  <<  'New_NTP_CONF'
server ntp1.yourcompanyhere.com
server ntp2.yourcompanyhere.com
server time.asia/euro/apple.com
New_NTP_CONF
sudo systemsetup -setusingnetworktime  on