From: "milton_aupperle" <milton@outcastsoft.com>

Date: October 4, 2009 2:39:43 PM MDT

To: Astro_IIDC@yahoogroups.com

Subject: Getting more accurate system clock times.


Hi folks;


One (of many) issues I've had with "Leopard" and "Snow Leopard" is that you can no longer easily determine how much off your Mac system clock is with respect to a NTP time server, or even if it is updating the system clock.


Under OS X 10.4 and earlier, when you check marked the "Set Date & Time Automatically" check box in the "Data & Time" preference panel, OS X would print off a message like this:


ntpdate[2519]: adjust time server 17.151.16.23 offset 0.000638 sec


into the console.log window. Each time you check mark and then unchecked it, you go that information printed out.


That tells you how much your Mac system clock is off with the Network Time Servers when it was re-synchronized. If you set it before an event happens (i.e. recording a movie) and then check it after your finished, you have a concrete idea how accurate your absolute time will be (i.e. within +/- 0.00x seconds for example)


In 10.5.x or higher that doesn't happen anymore so you have no idea if it actually adjusted the time or what the adjustment was. Also in 10.5.x if you don't have a network connection when you boot up or wake up, the time server does not automatically update either, and you can have dramatic time offsets (like 0.8 seconds), which makes the accuracy of when an event happened even more dicey.


I've found a work around to this to force the issue so that it updates the time server now and also prints off the offset into the terminal application window. To do it, your going to need to know the Administrator password for your Mac.


0) Turn ON your Network connection (Ethernet, WirelLess modem, etc.). Also check the that the "Set Date & Time Automatically" is unchecked in the Data & Time" preference panel too. If it's check marked, uncheck it and close the Date & Time Preference or you'll get an error message when you try and do it manually.


1) Locate the "Terminal.app" which is in the "Utilities" folder of the "Applications" Folder.


2) Launch "Terminal.app"


3) When the Terminal window appears, type in:


sudo -s


and press return.


4) You will next be asked for a Password:, which is your Administrator password and in most cases is the password you enter for your Mac when installing system software updates.


5) If that went fine, your now logged in and the command prompt:


bash-3.2# 


will appear under "Leopard". I don't recall what it shows under Snow Leopard.


6) Now type in the phrase (or copy and paste it into the terminal window):


ntpdate time.apple.com


and press return key.


7) After a short delay (usually a few second unless the server is bogged down, you will get a response like this:


4 Oct 14:09:40 ntpdate[290]: adjust time server 129.128.5.210 offset 0.020107 sec


This shows that the Mac time has been offset at +0.020107 seconds  (it could be negatyive too) from what it was originally. You can copy and paste this value out of the window for future reference  too.


8) Once your done you should log out so you leave no security breaches with this process. To do that type "exit" and press return. Then type "exit" and press return a second time until you see the message "logout [Process completed]" appear in the terminal window.


9) Now quit the Terminal.app application and your Time server will be  as accurately set as possible. You can recheck it after an event has occurred and that gives you an idea how much time has drifted between your adjustments.


You can find  alternative time servers than Apples (which sometimes has long delays) by searching Google / Yahoo etc. using the phrase:


ntp server "your country here"


like


ntp servers Canada


which is how I found the Alberta local server I use which is


time.srv.ualberta.ca


In the terminal, I use 


ntpdate time.srv.ualberta.ca


to update my Mac clock before recording some event and then afterwards to see how much drift has occurred.


Hope that helps someone..


Milton Aupperle