Setting Timezone on imaging not reflected in SysPrefs

mathieu
New Contributor

Hello all,
We have recently become responsible for Macs in a London office (we are NY based).
I’ve added a script to set UK localizations on Imaging (an “at reboot” script), with help from articles and resources from here (thank you!)

I am having one issue. I am using this command to set the timezone:

systemsetup -settimezone Europe/London

And the time changes successfully on the system, reflecting London time

However when I go into the System Preferences, it appears that NO time zone is selected in the GUI (see screenshot).
I’ve searched available timezone settings (systemsetup -listtimezones) and tried a few others, Europe/GMT has the same problem as does a fair amount of Europe.

Have any of you encountered this issue and have a workaround, &/or a preferred method of setting the timezone?

Thank you!
fad3ebec10c24410b92961733196e11b

6 REPLIES 6

andrew_nicholas
Valued Contributor

Does this change if you reboot a system? I've used the EuropeBrussels successfully, and haven't noticed any issues after an image completes.

davidacland
Honored Contributor II
Honored Contributor II

Strange, that normally works for us. To localise for UK Macs we use a config profile:

https://github.com/amsysuk/public_config_profiles/blob/master/LocalisetoUK.mobileconfig

And a first boot script that runs the above command /usr/sbin/systemsetup -settimezone "Europe/London"

The only difference I can see is we specify the full path to the binary and put the region in double quotes.

We've got a full breakdown of the first boot script here in case it's of use:

http://www.amsys.co.uk/2015/02/creating-config-profiles-instead-first-boot-script/

sean
Valued Contributor

Weird. Never noticed this, but just tested and saw the same thing. Of course the time and location is correct, but it just doesn't show the zone in the GUI. That said, I clicked somewhere in the GUI and since doing that, now every time I change the zone with the command the GUI now shows that change. Quick test on 10.9.5.

mathieu
New Contributor

Thanks for the input. @davidacland: I'm using the full path to the binary, & have tried it with quotes in the script. I'll also take a look at your config profile... the reason I used a script is so we could choose a UK imaging config at imaging time, instead of using prestage/DEP or scoping after the fact. How are you scoping the profile, eg, how does the Mac know it's getting UK localisations?

@andrew.nicholas A restart does not help, but as @sean suggests, clicking anywhere in the GUI or manually setting it once seems to fix it... but then its not automated anymore :(

For me it's actually reproducible through the command line on an already imaged machine as well (if the Timezone GUI hasn't been used)

bpavlov
Honored Contributor

Have you considered possibly enabling location services so that the time zone is detected automatically? Essentially you wouldn't have worry about what the default is because once it hits the wireless it'll detect the time zone and update accordingly.

Here's a thread discussing this:
https://jamfnation.jamfsoftware.com/discussion.html?id=6835

davidacland
Honored Contributor II
Honored Contributor II

@mathieu if the setup is multi-country, we use the API in a first boot script to either add the device to a static computer group, or add a value to a pop-up menu EA that adds the device to a smart group, and applies the config profile.

If it's a JSS just for a UK organisation, we apply it to all new devices

We're a JAMF integrator, just in case anyone wonders why we go around installing JSSes!