Time Library Organisation

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Mon Jan 31 05:51:23 EST 2005


"Simon Marlow" <simonmar at microsoft.com> writes:

> 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

If gmtime returns the TAI time (which I would expect, since it assigns
the TAI-UTC difference to the timezone), then a program trying to
determine the local timezone offset (to output a Date header in email
for example) may get confused by not getting an integral number of
minutes.

If gmtime returns the UTC time, then it gives different results than
a "portable" reimplementation of gmtime. Or, worse, it's incompatible
wit the inverse of gmtime, which is more likely to be implemented by
hand because it isn't provided by standard C (it only provides mktime,
an inverse of localtime; GNU C provides timegm as an extension).

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


More information about the Libraries mailing list