TAI zone?

Clive D.W. Feather clive at davros.org
Fri Jul 1 12:45:42 UTC 2011


Guy Harris said:
> Most clocks on the wall, even if they're in the UK and are not adjusted for Summer Time, probably don't ever, for example, say {12,23}:59:60, so presumably by "civil time" you don't mean "something that exactly mirrors UTC".  Whether they "drift" from UTC due to leap seconds, so that the minute and second counters don't match, or are adjusted manually to match UTC to handle both clock drift and leap seconds (but still don't match it during a leap second), and whether they're additionally off from UTC because they weren't set precisely in the first place is another matter.

Just to make things more complicated, civil time in the UK is GMT
(approximately UT1) and *not* UTC. So clocks should never have 23:59:60.

If the proposal to abolish leap seconds goes ahead, then civil time in the
UK will drift away from civil time in other countries, second by second.

> So what does civil time do during a positive leap second?

If you're in Germany, it:
> Tick the seconds counter from 59 to 60, to match UTC's seconds counter?

If you're in the UK, Austria, or Denmark, then your time is based on UT1
and not UTC, so there are no leap seconds.

(Most people in practice use UTC, but that's not what the laws in those
countries say.)

> There *is* no "UTC clock" in POSIX.  You cannot use only the POSIX APIs to convert a time_t, as returned by the POSIX time(), to the corresponding UTC time label, where the time label has HH:MM:SS; gmtime() will not do that for you, because gmtime() thinks that every minute ("minute" in the sense of period of time in which the minute counter of a clock ticks over) has exactly 60 seconds, which, for UTC time's minute counter, is not true.

Not quite. The conversion is well-defined, but sometimes two values on one
side map to one value on the other side.

-- 
Clive D.W. Feather          | If you lie to the compiler,
Email: clive at davros.org     | it will get its revenge.
Web: http://www.davros.org  |   - Henry Spencer
Mobile: +44 7973 377646



More information about the tz mailing list