MacOS X - set correct time AppleScript


/ Published in: AppleScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. (*
  2. The MacOS X clock is NOT set properly
  3. unless the Date & Time PrefPane is opened.
  4. *)
  5.  
  6. -- Open the Date & Time PrefPane
  7. do shell script "/usr/bin/open /System/Library/PreferencePanes/DateAndTime.prefPane"
  8.  
  9. -- Keep it open for a couple of seconds
  10. do shell script "/bin/sleep 10"
  11.  
  12. -- Close the SysPrefs
  13. quit application "System Preferences"
  14.  
  15. (*
  16. Done.
  17. The clock should be set correctly now.
  18. *)
  19.  
  20. (*
  21. When saved as an application,
  22. this script can be used to set the clock on startup.
  23.  
  24. Place it anywhere you like and add it to
  25. the startup items in the Users PrefPane.
  26. *)

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.