Return to Snippet

Revision: 4433
at December 11, 2007 03:05 by heinz1959


Updated Code
(* 
	The MacOS X clock is NOT set properly
	unless the Date & Time PrefPane is opened.
*)

-- Open the Date & Time PrefPane
do shell script "/usr/bin/open /System/Library/PreferencePanes/DateAndTime.prefPane"

-- Keep it open for a couple of seconds
do shell script "/bin/sleep 10"

-- Close the SysPrefs
quit application "System Preferences"

(*
	Done.
	The clock should be set correctly now.
*)

(*
	When saved as an application,
	this script can be used to set the clock on startup.
	
	Place it anywhere you like and add it to
	the startup items in the Users PrefPane.
*)

Revision: 4432
at December 11, 2007 03:01 by heinz1959


Initial Code
(* 
	The MacOS X clock is NOT set properly
	unless the Date & Time PrefPane is opened.
*)

-- Open the Date & Time PrefPane
do shell script "/usr/bin/open /System/Library/PreferencePanes/DateAndTime.prefPane"

-- Keep it open for a couple of seconds
do shell script "/bin/sleep 10"

-- Close the SysPrefs
quit application "System Preferences"

(*
	Done.
	The clock should be set correctly now.
*)

(*
	When saved as an application,
	this script can be used to set the clock on startup.
	
	Place it anywhere you like and add it to
	the startup items in the Users PrefPane.
*)

Initial URL


Initial Description


Initial Title
MacOS X - set correct time AppleScript

Initial Tags


Initial Language
AppleScript