Peter J. Acklam wrote:
Conveniently for me, the pages you quote back me up, not you.

I should have been more explicit in what I was asserting, then. The colloquial term "GMT" has been supplanted by the functionally equivalent, and much more accurately defined, "UTC" as the source of international time. Since 1986 at least, anyone referring to GMT was actually talking about UTC, i.e. EST is UTC-4 _not_ GMT-4. GMT was always a social convention, and as such, people still use it in the colloquial sense. UTC is an international standard, based on precise rules and measurements, which is nonetheless employed in exactly the same situations as formerly covered by GMT.


I have no argument that the definition of UTC is completely different from the loosely defined GMT. However, it is clear that GMT lead directly to UTC (which is why the Zulu timezone is still Greenwich. And it is also clear that when most people today refer to GMT, they are actually talking about UTC. Only us time weenies (and astronomers) care about the details...



Perl is not using TAI, but rather the underlying O/S epoch
(which usually means UTC).


I didn't mean that Perl is using a TAI library, but the TAI time
system or TAI calendar.  The reason why I suggested TAI was that
in the TAI time system there are no leap seconds and every second
has the same length.  GMT doesn't have leap seconds either, but
the length of each second is not a fixed value.

Perl is _not_ using TAI, since it is employing an epoch corresponding to the Unix epoch (except on Mac's???). It is, however, not correctly handling leapseconds, which isn't too suprising since hardly anything does. NTP, for example, does not handle leapseconds either.


See this discussion by Dr. Bernstein:

http://cr.yp.to/proto/utctai.html

In it, he suggests that some O/S vendors have correctly patched localtime() to use the Olson library (in strict violation of POSIX specs). At least on the *nix's I have here, I see no sign of leap seconds:


$ cat test.c #include <stdio.h>
#include <time.h>


int main(void)
{
    time_t result;

for ( result = 78796799; result <=78796801; result++) {
printf("%s", asctime(gmtime(&result)));
}
return(0);
}

yields


$ ./test
Fri Jun 30 23:59:59 1972
Sat Jul  1 00:00:00 1972
Sat Jul  1 00:00:01 1972


which is the same output as Perl.

John

--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748



Reply via email to