Posted By

heinz1959 on 12/11/07


Tagged

applescript macosx set clock


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

sbbath
heinz1959


MacOS X - set correct time AppleScript


 / Published in: AppleScript
 

  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
Posted By: heinz1959 on August 10, 2009

THIS is better: http://www.squashedsoftware.com/products-ntp-clock-sync.php

You need to login to post a comment.