Posted on 05-29-2015 02:25 AM
Hi,
What is the best way to script the the 24 hour clock setting across the entire OS instead of the default 12 hour setting?
I already use the terminal commando /usr/sbin/systemsetup -settimezone "Europe/Amsterdam" -setnetworktimeserver "time.euro.apple.com" -setusingnetworktime on to set the correct timezone/server but this doesn't adjust the display of the clock itself.
Searching through google didn't provide me with an answer. The only topic that i've found (http://apple.stackexchange.com/questions/75116/i-want-to-change-clock-from-12h-to-24h-mode-via-terminal) pointed me to a plist that doesn't seem to exist in Yosemite.
Thanks in advance!
Posted on 05-29-2015 04:16 AM
Hey,
Try
/usr/bin/defaults write com.apple.menuextra.clock 'DateFormat' -string 'EEE MMM d H:mm'
then
/usr/bin/Killall SystemUIServer
If you are going to push it out via casper then you will have to do a script something like this as its a user level preference:
currentuser=/usr/bin/stat -f%Su /dev/console
/usr/bin/defaults write /Users/$currentuser/Library/Preferences/com.apple.menuextra.clock 'DateFormat' -string 'EEE MMM d h:mm'
/usr/bin/Killall SystemUIServer