[tz] [PROPOSED] Fix ambiguous leapsecs by rolling up to a minute
Michael H Deckers
michael.h.deckers at googlemail.com
Mon Sep 13 13:38:40 UTC 2021
On 2021-09-12 23:42, Paul Eggert wrote:
> It sounds like you're saying that the situation is tricky in this
> area, which it certainly is (as witness my confusion!).
>
>> With the proposal, however, the condition is not satisfied;
>> for instance, in the example given in the proposed
>> comment, the local time would differ from UTC by T01:23:46
>> from 1972-07-01T00:00:00Z to 1972-07-01T00:00:14Z
>
> I think that calculation is not quite right. With the fix, the
> localtime-minus-UTC value remains 5025 seconds throughout, using a
> calculation that takes the positive leap second into account. This can
> be confirmed by looking at tm_gmtoff in the affected seconds.
Isn't it quite simple to compute the fictitious local time LT:
when UTC is 1972-06-30T23:59:59Z then LT is 1972-07-01T01:23:44
1972-06-30T23:59:60Z then LT is not well-defined
1972-07-01T00:00:00Z then LT must be 1972-07-01T01:23:45
so as to keep the offset at 01:23:45 from UTC
1972-07-01T00:00:14Z then LT must be 1972-07-01T01:23:59
1972-07-01T00:00:15Z then LT must be 1972-07-01T01:24:00
In your proposal, LT - TAI and UTC - TAI have discontinuities at
different values of TAI so that LT - UTC just cannot be constant.
Michael Deckers.
More information about the tz
mailing list