[LEAPSECS] leapseconds, converting between GPS time (week, second) and UTC

Gary E. Miller gem at rellim.com
Tue Jan 15 13:58:27 EST 2019


Yo Tom!

On Tue, 15 Jan 2019 10:50:10 -0800
"Tom Van Baak" <tvb at LeapSecond.com> wrote:

> Nope. All minutes have 60 seconds in Excel. And in Windows. And in
> Unix/POSIX.

Not quite.  Check out "man gmtime" for one way that POSIX represents time.

Specifically:

           struct tm {
[...]
               int tm_sec;    /* Seconds (0-60) */

gmtime() is perfectly capable of reporting 61 seconds in a minute.

Failure to account for this causes mnay problems.

What it does not do well is accounting for leap seconds that are in
the past or future.

> Right, this is typical for almost any software developed anywhere.
> Leap seconds are such a weird exception, almost no commercial
> software, web frontend or backend, or mobile phones, or mobile apps
> deal with them correctly.

But gpsd and ntpd try real hard to be correct.  Sadly, with leap smear,
there is no consensus on what is 'correct'.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://pairlist6.pair.net/pipermail/leapsecs/attachments/20190115/a8ccd4c9/attachment.sig>


More information about the LEAPSECS mailing list