News for hackers. Stuff that matters.
Re:Time.is by ComputerGuru on Sunday March 11, 2012 @01:27PM (#3690716)
The answer to your question is GPS devices. They're supposed to take into account (most of) what you mentioned, and even though consumer GPS devices are fairly cheap and not up to industrial or even military GPS, time is one thing they do right. In fact, for several projects that needed a reliable time source instead of using the (as you noticed) poorly implemented atomic clock radio frequencies, we would just buy GPS chips to just extract the time signal.

<removed NTP stuff>

I simply don't have any clocks that aren't part of electronic devices, my wristwatch being the exception (but it's analog (Roman numerals, even :P) and only has second accuracy anyway, so I don't fuss about it).

Simply put, all my devices take care of all this for me. My MacBook and Windows 7 work desktop are both configured to sync to the Apple NTP servers (lowest ping for me, AND they're always up. Microsoft's are down a good 10% of the time in my experience). My cell phone gets its signal from God knows where (iPhone 4S - it could technically be using one of 4 different sources) but is always more or less in sync with the rest (I just checked with time.is for what little that is worth, however, and while my MacBook says that my time is within the margin of error "The difference from Time.is was -0.007 seconds (±0.018 seconds).", my iPhone returns "Your clock is 0.5 seconds slow" - but I would trust my iPhone's NTP implementation over time.is' response as its the same OS X NTP that got it "right" on my MacBook) as it can theoretically use a) GPS b) GSM/CDMA towers c) NTP d) time from PC sync.

All my other electronic devices fall in the same category. Garmin nüvi (GPS), Kindle (NTP, auto configured), Cisco IP Phone (NTP, manually configured), Brother printer (NTP, manually configured). I purposely do not set my microwave clock because a) I'll never get it right, and b) any time the power cuts, it resets and in 2012 they're still too stupid to add a 5 cent battery to keep the time in case of power outage.

Re:Time.is by dfc on Sunday March 11, 2012 @02:07PM (#3690844)
NTP does a lot more than what you theorized about and none of it is trivial.

FYI: Ping is a remarkably bad tool to gauge the accuracy of remote time source. What is the delay value from "ntpq -p"

I highly doubt that Apple's time servers are your best bet for time synch. Use the pool.ntp.org servers, preferabbly with your country code: e.g. us.pool.ntp.org, ca.pool.ntp.org.

Re:Time.is by ComputerGuru on Sunday March 11, 2012 @02:22PM (#3690874)
I removed the bit about NTP as it was mostly half-baked ramblings. I obviously didn't mean "ping" the tool, rather the process of "pinging" a remote address and gauging the response time, at the most basic.

My ntpq -p output:

        remote           refid      st t when poll reach   delay   offset  jitter
   ==============================================================================
    time.apple.com  .INIT.          16 u    -  512    0    0.000    0.000   0.000
Re:Time.is by dfc on Sunday March 11, 2012 @02:33PM (#3690897)
Your computer has not successfully contacted the time.apple.com server. If it had the refid would not be INIT and your "reach" value would not be 0.

what happens if you change your time server to us.pool.ntp.org? (Substitute your country code for "us".)

Preferably you should have more than one server. The ntp reference implementation on osx is a little goofy because of the GUI configuration. But I think if you put us.pool.ntp.org,us.pool.ntp.org,us.pool.ntp.org for the server your computer will try to spin up three ntp connections. Atleast three, never two...

"A man with one watch knows what time it is; a man with two watches is never quite sure."

Re:Time.is by logic on Sunday March 11, 2012 @04:53PM (#3691255)
> But I think if you put us.pool.ntp.org,us.pool.ntp.org,us.pool.ntp.org for the server your computer will try to spin up three ntp connections.

Close, but not quite; ntpd appears to be smart enough to realize you have three identical "server" lines in ntp.conf, and collapses them. Try this instead:

1.us.pool.ntp.org,2.us.pool.ntp.org,3.us.pool.ntp.org

Changing "us" to your country code, of course. Just tested, and it appears to produce the desired behavior.

Re:Time.is by dfc on Sunday March 11, 2012 @05:33PM (#3691352)
ntp is not "smart enough to realize you have three identical "server" lines in ntp.conf". Before the addition of the pool directive in 4.2.7 this was the recommended approach (as in recommended by prof. mills, harlan and the rest of the ntp reference implementation team). OSX is trying to be cute and thinks it knows more about ntp than the user.

Try editing /private/etc/ntp.conf and append:

  # use multiple ntp servers
  server us.pool.ntp.org iburst
  server us.pool.ntp.org iburst
  server us.pool.ntp.org iburst
Make sure you have an extra empty line above the comment. There is something goofy about the way osx includes the input from the graphical configuration and what is included in the /private/etc/ntp.conf In order to restart the service you need to disable/re-enable the automatically set time.