Re: C1X calendar and long time proposals




On 2009-09-20, David R Tribble wrote:

> Michael Deckers wrote:
> > I see. What I do not see is which longtime_t values can
> > distinguish the two different instants when UTC was
> > 2005-12-31T23:59:60 (with 32 leap seconds), and
> > 2006-01-01T00:00:00 (with with 33 leap seconds).
> > NTP timestamps have the leap second bit to distinguish
> > them -- but longtime_t values don't.
>
> Those two times differ by one second, so their corresponding
> longtime_t values differ by one second's worth of ticks, i.e., the
> later time will be 2^29 greater than the earlier time.

OK, this means that you do mean [b] after all: longtime_t values
are intended to represent
[b] floor( ( TAI - 2001-01-01 - 32 s )/( 2^-29 s ) ).

I probably should have stated that I meant the difference in both
formulae to be taken as in the POSIX formula for "seconds after the
epoch", without any leap second magic, so that the difference
2006-01-01T00:01:00 - 2005-12-31T23:59:00
is always 120 s, regardless of the time scale (TAI or UTC or TDB or..).

> Likewise, passing these values to longtimeleapsecs() will return
> 33 for both, as they both include the same (33rd) leap second.
> Passing a value representing one tick before the earlier
> time (i.e., the point in time prior to the insertion of the 33rd leap
> second) will return 32.

That's the question: when exactly does TAI - UTC increase by 1 s
upon insertion of a positive leap second. The leap second mentioned
above goes
from 2005-12-31T23:59:60 UTC until 2006-01-01T00:00:00 UTC and
from 2006-01-01T00:00:32 TAI until 2006-01-01T00:00:33 TAI.
In Ada05, the increase in TAI - UTC is taken to occur at the
beginning of the leap second, as you propose. But the time stamps
in Ada05 for the leap second above go
from 2005-12-31T23:59:59 until 2006-01-01T00:00:00
(Ada05 does not use out of range seconds fields), so that the
discontinuity in the calendar components is indeed at the beginning
of the leap second. With the UTC time stamps using overflowing
seconds fields, the discontinuity might be taken to occur at the
end of the leap second. However this is decided, it should be
documented because the official definition of UTC (["Recommendation
ITU-R TF.460-6 Standard-frequency and time-signal emissions".
2002 Geneva]) is silent on this point.

> As I've said before, I would just as soon ignore leap seconds,
> but more than one person in comp.std.c has made it clear
> that applications that need leap seconds really need them
> badly. All other applications can simply remove them, either
> using longtimeleapsecs(), or by ignoring cal_sec values
> greater than 59 when converted to calendar date objects.
> The cal_leapsecs member is also present for this need.

A proposal to cease the use of leap seconds in UTC is under discussion
since at least 2000 ([http://www.ucolick.org/~sla/leapsecs/]).
However, ITU standardization seems to be even slower than
programming language standardization by ISO, so that leap seconds
will probabaly still be with us when standard C1x is issued. And then,
dealing systematically with time scales that are non-injective functions
of TAI (such as UTC at positive leap seconds, and time zone times upon
their switch to winter time) is a nice and challenging design problem!

Michael Deckers.
.



Relevant Pages

  • Re: Extra leap seconds due to earthquake?
    ... > internationally-agreed extra leap second or seconds that are sometimes ... > On the GPS front, I think that GPS internal system time (UTC as at ... > satellites) is now 13 seconds ahead of today's UTC, ... It is expected that Celestial Pole offsets related to the IAU1980 Nutation ...
    (sci.geo.satellite-nav)
  • Re: Extended-Range Time Type
    ... since UTC midnight of the current day can be done in ISO C, ... First because "the current day" within ISO C will force you to ... if that day happens to have a leap second (would be Jun or Dec ... determinability of the local timezone, and that the timezone has a integer ...
    (comp.std.c)
  • Re: Julian Date and Leap Seconds
    ... The length of of UTC day is not constant. ... except when a leap second is needed. ... strictly uniform time scale so it's bound to drift away from ... time scales that are uniform unless periodic corrections are ...
    (sci.astro)
  • LEAP SECOND TO BE INTRODUCED BY THE END OF THE YEAR & LEAP SECOND TALKS POSTPONED
    ... The International Earth Rotation and Reference Systems Service ... provided in IERS Bulletin A. ... UTC and all time scales based on UTC will be affected by this ... Before the leap second ...
    (sci.geo.satellite-nav)
  • Re: [ntpwg] Bug: Status/Summary of slashdot leap-second crash on new years 2008-2009
    ... ship them late, or never, if the distro is old enough. ... the needed notification of a leap second to anyone ... NTP will only know about leap seconds if it was ... NTP to also provide TAI information -- e.g. to add a ...
    (Linux-Kernel)

Loading