Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
### Enable Location Services to set time based on location
/bin/launchctl unload /System/Library/LaunchDaemons/
uuid=`ioreg -rd1 -c IOPlatformExpertDevice | awk -F'"' '/IOPlatformUUID/{print $4}'`
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/$uuid \
LocationServicesEnabled -int 1
/usr/sbin/chown -R _locationd:_locationd /var/db/locationd
/bin/launchctl load /System/Library/LaunchDaemons/
# set time zone automatically using current location
/usr/bin/defaults write /Library/Preferences/ Active -bool true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment