[LEAPSECS] Crunching Bulletin B numbers (POSIX time)

Tony Finch dot at dotat.at
Mon Feb 21 06:17:16 EST 2011


On Mon, 21 Feb 2011, Ian Batten wrote:


> > Ascii timestamps do not have a way to include leap second information.

>

> But they trivially could.


Is there any standard way to do so? If there is I would love a citation!

Time zone information is recorded in timestamps as an offset, so if the
software is set to an unexpected timezone or has stale timezone tables,
you can still understand what time it thought it meant. The only way to
get a similar lack of ambiguity wrt leap seconds is to include the TAI-UTC
offset in the timestamp.

Even if your time zone and leap second tables are up-to-date and your
clock is correctly synchronized, you must still include these offsets in
any timestamps that you calculate for events in the future, because your
tables might become incorrect in the interval between the calculation of
the timestamp and the point in time that it represents.

But note I am assuming that you want to represent an absolute point in
time (say, an astronomical event) rather than an event identified by the
position of the hands on a clock. There is a general rule that if changes
in timezone or leapsecond tables cause problems for timestamps that you
calculated in advance, then you are representing those timestamps in the
wrong format or according to the wrong timescale. In every-day affairs it
is very unusual to schedule future events for absolute points in time, but
instead they are scheduled for a particular local time in a given place
regardless of timezone or leapsecond disruption.

Tony.
--
f.anthony.n.finch <dot at dotat.at> http://dotat.at/
Rockall: Southwesterly, backing southerly later, 4 or 5, occasionally 6. Rough
or very rough. Rain or showers. Moderate or good.


More information about the LEAPSECS mailing list