TAI zone?

Guy Harris guy at alum.mit.edu
Thu Jun 30 01:57:12 UTC 2011


On Jun 29, 2011, at 6:20 PM, Paul Koning wrote:

> Never mind, I guess my leg just got pulled.

For the full story, read section 4.15 "Seconds Since the Epoch" of

	http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html

and

	http://pubs.opengroup.org/onlinepubs/9699919799/functions/time.html

and

	http://pubs.opengroup.org/onlinepubs/9699919799/functions/localtime.html

and

	http://pubs.opengroup.org/onlinepubs/9699919799/functions/mktime.html

and section A.4.15 "Seconds Since the Epoch" of

	http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap04.html

In a sane world:

	1) time() would return a value that tries its hardest to be a count of the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC (meaning it doesn't stop during a positive leap second, nor does it leap ahead when a negative leap second occurs);

	2) gmtime() would convert that value to the appropriate set of numbers for the UTC label for that instant in time, including the seconds value being "60" or "61" or whatever's involved in properly handling leap seconds;

	3) localtime() would convert that value to the appropriate set of numbers for the local time label for that instant in time, including the previous plus time zone conversion;

	4) mktime() would convert the other way as best as can be done given any cases where multiple instances of time have the same labels.

At least as I read Annex I of

	http://www.cl.cam.ac.uk/~mgk25/volatile/ITU-R-TF.460-4.pdf

it says that TAI is, ultimately, a counter that ticks once per second:

	B. International Atomic Time (TAI)

	The international reference scale of atomic time (TAI), based on the second (SI), as realized at sea level, is formed by the Bureau international des poids et mesures (BIPM) on the basis of clock data supplied by cooper- ating establishments. It is in the form of a continuous scale, e.g. in days, hours, minutes and seconds from the origin 1 January 1958 (adopted by the CGPM 1971).

(which sounds like "seconds since the TAI Epoch", where the TAI Epoch is the beginning of 1958-01-01 in, presumably, Greenwich in the UK).  I'm not quite sure what it's saying about UTC:

	C. Coordinated Universal Time (UTC)

	UTC is the time-scale maintained by the BIPM, with assistance from the International Earth Rotation Service (IERS), which forms the basis of a coordinated dissemination of standard frequencies and time signals. It corresponds exactly in rate with TAI but differs from it by an integral number of seconds.

	The UTC scale is adjusted by the insertion or deletion of seconds (positive or negative leap-seconds) to unsure approximate agreement with UT1.

"Corresponds exactly in rate with TAI" sounds like "ticks once per second".  I'm not sure what "the UTC scale" in "The UTC scale is adjusted by the insertion or deletion of seconds (positive or negative leap-seconds) to unsure approximate agreement with UT1." means; does it mean that the "integral number of seconds" between UTC and TAI varies over time (which means UTC is *not* a counter that ticks once per second), or does it mean that if you attach date/hour/minute/second labels to values on the UTC scale, they don't always go from, say, {date}/23/59/59 to {date+1}/00/00/00 - they might jump from {date}/23/59/58 to {date+1}/00/00/00, or from {date}/23/59/59 to {date}/23/59/60 to {date+1}/00/00/00?



More information about the tz mailing list