Turn off Auto Time Zone in Big Sur

fernando_gonzal
Contributor

So I am having trouble turning OFF the Auto Time Zone setting in Big Sur.

Most of the other discussions are centered around turning this ON but I want to turn it OFF as this is for ethernet connected lab deployments (we turn off WiFI).

I tried taking a script that's floating around the Jamf discussions for turning on Location Services and Auto Time Zone and convert it to a turn off script

#!/bin/bash

## disabling location services
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -int 0

uuid=$(/usr/sbin/system_profiler SPHardwareDataType | grep "Hardware UUID" | cut -c22-57)
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd.$uuid LocationServicesEnabled -int 0

## configure automatic timezone to off
/usr/bin/defaults write /Library/Preferences/com.apple.timezone.auto Active -bool NO
/usr/bin/defaults write /private/var/db/timed/Library/Preferences/com.apple.timed.plist TMAutomaticTimeOnlyEnabled -bool NO
/usr/bin/defaults write /private/var/db/timed/Library/Preferences/com.apple.timed.plist TMAutomaticTimeZoneEnabled -bool NO
/usr/sbin/systemsetup -setusingnetworktime off

but the "Set time zone automatically using current location" continues to be unchanged.

bbfefb8d1afe43a3b697942bca710cbf

Any Suggestions?

Our workflow was working fine for setting the Time Zone in Catalina though that Time Zone setting script I am using no longer works in Big Sur. I'm assuming because "Set time zone automatically using current location" is now turned on in Big Sur where as it's turned off in our Catalina deployments.

A big difference for our Big Sur deployments is that we are using the Auto Advance for Mac feature in PreStage.

1 REPLY 1

fernando_gonzal
Contributor

Okay, after troubleshooting I figured out the issue was the old Time Zone setting script I was using since Mojave. Apparently it doesn't work in Big Sur anymore (even though it looks like it should).

I rewrote it as just a simple one liner and I can now set the Time Zone again even with Location Services and Auto Time Zone turned on.

#!/bin/sh

systemsetup -settimezone America/Chicago

exit 0