[LEAPSECS] BBC radio Crowd Science

Richard Clark rclark at noao.edu
Tue Jan 31 14:49:18 EST 2017


It seems like it depends which direction you are trying to convert.

TAI to UTC does require knowledge of both the the current (TAI-UTC)
and that a leap second is in progress.

As long as we only have positive leap seconds you can get away with
applying the new value of (TAI-UTC) after the leap second.
To go from UTC to TAI, down in the code will be an  hhmmss_to_sssss
function. If this is the simple minded one-line function that
immediately comes to mind then it will have no difficulty handling
the non-normalized 23:59:60 and putting it 86401 seconds after
00:00:00 earlier that day. So here you can apply the new value of
(TAI-UTC) starting with the first second after the leap second.

And then, in the case of a negative leapsecond you frantically scramble
to fix your code.

Richard Clark

On Tue, 31 Jan 2017, Warner Losh wrote:

> On Tue, Jan 31, 2017 at 12:08 PM, Steve Allen <sla at ucolick.org> wrote:
>> On Tue 2017-01-31T13:58:15 -0500, Brooks Harris hath writ:
>>> Ah, so who's right?
>>
>> I prefer to think of a leap second as being truly intercalary.
>> It is saying to atomic clock "It's not tomorrow yet, wait a second."
>> It is between one calendar day of UTC and the next calendar day of UTC.
>> It belongs to neither of them.  The tag 2016-12-31T23:59:60 is merely
>> a way of indicating which two days it is between.
>> It is unfortunate that nobody thought this stuff through in 1969 when
>> the decision was made to implement the leap second, and no matter how
>> it is expressed, encoded, and calculated it will be a special case.
>
> Philosophically you may be right.
>
> Mathematically, however, I don't think that makes much sense. :60 is
> an irregular radix. It's clearly added to the prior day, just like Feb
> 29th is part of February. Also, doing the long-hand math on the
> irregular radix, it also makes sense to have it be part of the prior
> day and to increment the offset at the start of the leap second.
>
> Warner
> _______________________________________________
> LEAPSECS mailing list
> LEAPSECS at leapsecond.com
> https://pairlist6.pair.net/mailman/listinfo/leapsecs
>


More information about the LEAPSECS mailing list