[time-nuts] GPS Leap Second
jim at jimking.net
Fri Aug 5 08:27:10 EDT 2005
Poul-Henning Kamp wrote:
>In message <42F2520D.1060705 at jimking.net>, Jim King writes:
>>M. Warner Losh wrote:
>>>We started seeing the GPS future leap second being broadcast today
>>>here. Just as a sanity check, are others seeing it as well?
>>I noticed it yesterday in my ntpd clockstats file, although in a
>>somewhat alarming fashion:
>>53586 1.311 127.127.30.0 ONCORE: Leap second (1) scheduled for
>>1Feb2006 at 0:0:0
>>It appears that either ntpd or my Oncore (an M12 V1.3) thinks that the
>>leap second is a month later than what everybody else thinks.
>I bet that is the usual struct tm bug:
> int tm_mon; /* month of year (0 - 11) */
Hmm, you must have done this before. :)
After a quick look at refclock_oncore.c: Not tm_mon, but very similar:
The month number in the @@Gj message is 1..12, and it's used to index
into an array of month names, so of course you get the wrong month name
printed in the message.
However, from my quick code inspection this appears to be a cosmetic bug
only. Where the date parameters from the @@Gj message are used
otherwise they're compared to date parameters from other Oncore
messages, so 0..11 vs. 1..12 confusion doesn't apply.
On the other hand, I'm still wondering if the data itself is correct.
It looks like @@Gj is saying that the leap second will occur on Jan. 1
at 00:00:00. Is that the correct thing for this message to indicate for
a leap second that will occur on Dec. 31 at 23:59:60? Perhaps the @@Gj
message really means "the leap second is inserted before this
date/time"? The Motorola documentation that I have is unclear on this
More information about the time-nuts