Time Libraries Rough Draft

Aaron Denney wnoise at ofb.net
Sat Feb 12 15:36:35 EST 2005

On 2005-02-12, Ashley Yakeley <ashley at semantic.org> wrote:
> 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.

There are systems that currently return TAI with the libc functions.
In the real world, many systems do not obey POSIX.  And with damn good
reason here.  It's just too silly.

Aaron Denney

More information about the Libraries mailing list