Time Library Organisation

Simon Marlow simonmar at microsoft.com
Mon Jan 31 05:33:10 EST 2005


On 28 January 2005 21:54, Ketil Malde wrote:

> Ashley Yakeley <ashley at semantic.org> writes:
> 
>> It seems what should have been done was to create a patch to the
>> kernel that allows the hardware clock to run on TAI but have
>> gettimeofday return broken time as per POSIX, and have some other
>> function to return TAI time. Perhaps someone's done this.
> 
> I tried to find out, with no success.  Anybody?  I'm about to
> reinstall my Linux laptop after a disk crash, so I could try to do
> this. It also appears that support is needed in NTP, although I'm not
> sure why.

I don't know about the NTP support, but at least with GNU libc you can
use a system clock set to TAI:

> TZ=Europe/London date      
Mon Jan 31 09:42:47 GMT 2005
> TZ=right/Europe/London date
Mon Jan 31 09:42:26 GMT 2005

when TZ is set to "right/..." glibc assumes the system clock is set to
TAI seconds since the epoch.

Of course, there's still no way for a user program to tell whether the
system clock is supposed to be TAI or UTC.

Cheers,
	Simon


More information about the Libraries mailing list