[LEAPSECS] BBC radio Crowd Science
John Sauter
John_Sauter at systemeyescomputerstore.com
Sun Jan 29 23:23:27 EST 2017
On Sun, 2017-01-29 at 15:09 -0500, Steve Summit wrote:
> Tom Van Baak wrote
> > John Sauter wrote:
> > > I had thought that TAI-UTC was the only information needed to
> > > convert
> > > from TAI to UTC [...] Is
> > > my new belief correct that you need both TAI-UTC and the
> > > knowledge that
> > > a leap second is in progress to convert from TAI to UTC?
> >
> > Hmm, it sounds like your new belief is wrong too. [...] The table
> > is all
> > you need to decide how to convert between TAI/UTC and UTC/TAI. Yes,
> > the
> > code gets tricky near +/- N seconds of midnight, where N is |TAI-
> > UTC|.
>
> I think John's point is that if all I have is a TAI timestamp t,
> and an interface to a leapsecond table that returns taioffset(t)
> for TAI time t, that's not quite enough to unambiguously compute
> the corresponding UTC timestamp. If I take t and subtract
> taioffset(t), I don't know whether the UTC result I get should
> end in :60, so to speak.
>
> As it happens, just last week I write a TAI-to-UTC conversion
> function, and I had to invent a new interface into my leapsecond
> table: it returns the TAI-UTC offset for a given time t, *and* it
> returns the time of the transition nearest to t, which is what's
> needed to make the leap-second determination John is talking about.
I think it would be sufficient to know the TAI-UTC value for the
current time, and for the current time + one second. If the future
value is one greater than the current value, there is a leap second in
progress.
John Sauter (John_Sauter at systemeyescomputerstore.com)
More information about the LEAPSECS
mailing list