Time Libraries Rough Draft

Ashley Yakeley ashley at semantic.org
Sat Feb 12 08:28:27 EST 2005


In article <200502111713.47693.p.turner at computer.org>,
 Scott Turner <p.turner at computer.org> wrote:

> So during a leap second, the DiffTime field returned by getCurrentTime should 
> be between 86,400,000,000,000,000 and 86,400,999,999,999,999.  That is, it 
> should indicate an hour, minute, second of 23:59:60.  With current OSes this 
> will not happen because they fudge the leap second. 

Yes, and this is an important point that I should have mentioned before. 
Even with the UTCTime type, which can represent leap-seconds correctly, 
getCurrentTime is still going to be wrong during them, because the 
underlying C call ("gettimeofday") returns broken POSIX time.

> When the improvements to 
> NTP are available, true UTC can be supported by getCurrentTime.

It's not just NTP, there would have to be a new function in libc.

-- 
Ashley Yakeley, Seattle WA



More information about the Libraries mailing list