[LEAPSECS] Crunching Bulletin B numbers (POSIX time)

Keith Winstein keithw at MIT.EDU
Tue Feb 22 22:55:36 EST 2011


On Tue, 22 Feb 2011, Steve Allen wrote:


> On Tue 2011-02-22T18:01:00 -0500, Keith Winstein hath writ:

>> If you just need GPS-CC time, you're right. Adding 19 seconds gets you

>> within 1 microsecond of "TAI(USNO,MC)".

>

> Correct me if I'm wrong, but I think if you

>

> 1) buy a Meinberg NTP server

> 2) configure it to emit GPS time instead of UTC

> 3) get the zoneinfo source code files

> 4) edit the "leapseconds" file and delete all leaps before 1980

> 5) compile the zoneinfo files yourself, asking for the "right" ones

> 6) install the resulting zoneinfo files

> 7) set the system to use the "right" timezone

> 8) set the system to use your Meinberg stratum 1 NTP server

>

> then you have a system which is running its time_t based on GPS time,

> therefore does not have issues with leap seconds resetting the clock,

> and which produces a correct local time string for every time zone.


Hmm, I don't totally agree. You still can only produce a correct local
time, and accurate measurements of the intervals between local times, for
instants that occurred _in the past_ or up to a few months in the future.

Calculations further in the future, though, still won't be "functional"
and will change their results when new leap seconds are loaded into the
zoneinfo files. This seems to be to be an artifact of having intercalary
seconds in the local time scale at all -- whether they are in time_t (as
in POSIX) or in the conversion to localtime (as here), it seems to be the
same problem either way.

Second, you'd have to keep recompiling those zoneinfo files every time
there's a new leap second announcement, and getting running processes to
reload them each time (which is not easy for a long-running process). I
think this is part of why the "right" timezones haven't swept the world.

Finally, I'm not sure it would be a good idea to standardize on
distributing GPS Composite Clock time as opposed to a realization of TAI
-- those A0 and A1 steering parameters are nice, and if you have a GPS fix
you have them too (at least after 12.5 minutes).

-Keith


More information about the LEAPSECS mailing list