Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



Perry E. Metzger wrote:
> Garrett D'Amore <garrett_damore%tadpole.com@localhost> writes:
>   
>> Perry E. Metzger wrote:
>>     
>>> Garrett D'Amore <gdamore%netbsd.org@localhost> writes:
>>>   
>>>       
>>>> Modified Files:
>>>>    src/sys/kern: kern_todr.c
>>>>
>>>> Log Message:
>>>> Allow for leap seconds.
>>>>     
>>>>         
>>> I would have thought 61 was sufficient. Is 62 really possible?
>>>
>>> Perry
>>>   
>>>       
>> I don't know if 62 is.  I know that 61 is possible.  Frankly, if it is
>> 62, it doesn't hurt to handle it, as long as nothing else is weird.  (If
>> its bad, then most likely other things will be bad.)
>>     
>
> http://en.wikipedia.org/wiki/Leap_second seems to indicate that 61
> seconds is the max. A leap second is called whenever UT1 and UTC are
> about to get more than .9 seconds apart.
>
> Perry
>   

I believe it is technically possible for a clock to have _2_ leap
seconds inserted.  Recall that leap seconds are inserted based on
observation of the rotation of the earth relative to real time.  I don't
think we've ever had a 2-leap-second addition, but I seem to recall that
properly written software had to account for it.

That said, we all know that pretty much every, if not every, RTC we have
support for in NetBSD knows nothing about leapseconds, and won't pass
this information anyway.

So, for now I vote to leave it as is; I think it is pedantically correct
as it stands, and if it is wrong does no harm.  If someone who has
authoritative knowledge on the matter indicating my understanding is
incorrect wants the code changed, then I won't argue.

-- 
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134  Fax: 951 325-2191




Home | Main Index | Thread Index | Old Index