[time-nuts] Leap second to be introduced at midnight UTC December 31 this year

Gary E. Miller gem at rellim.com
Wed Jul 20 03:10:27 EDT 2016

Yo time-nuts at febo.com!

On Tue, 19 Jul 2016 23:18:18 -0700
Hal Murray <hmurray at megapathdsl.net>, time-nuts at febo.com wrote:

> gem at rellim.com said:
> >> In general there's a common belief that a leap second can only
> >> occur at the end of June or December. This is false. Don't ever
> >> hardcode this assumption.  
> > NTP Classic thinks otherwise:
> > 	http://bugs.ntp.org/show_bug.cgi?id=3D1090   
> If you read the fine print in that bug, you will see that it's a work
> around for a bug in the HP firmware that is the core of this
> discussion.

Yes, I know the problem being solved.  Like today, the leap second being
broadcast sooner than ntpd expects, so it picks the wrong month.

> I don't think there is anything in the core of ntpd that restricts
> leap seconds to Jun/Dec.  If there was, it would have filtered out
> the above problem.

How about this:

ntpd/refclock_hpgps.c, line 544:

                    /* See http://bugs.ntp.org/1090
                     * Ignore leap announcements unless June or December.
                     * Better would be to use :GPSTime? to find the month,
                     * but that seems too likely to introduce other bugs.
                    case '+':
                        if ((month==6) || (month==12))

> Things get interesting if you are shipping code today that will last
> for 10 or 20 years.  My HP Z3801A has software dates from 1995 so 20
> years isn't unreasonable.  Of course, they were retired from
> commercial use a long time ago, so maybe it's OK if the firmware has
> bugs.

20 years?  My house is 40 years old.  In an IoT world people would like
to not throw away capital equipment every decade.

But i'm prolly spitting into the wind...

> I don't know any software projects that handle this sort of thing
> cleanly. (My exposure is limited.)

gpsd filters out all but June and December.  So sort of cleanly, but
clearly work needed.  I notice ntpd also filters out leap warnings for
the first short bit of the month.  That might be worth doing too.  I'm
sure something else will crop up before 2017.

If a giant asteroid hits earth, and we need a negative leap second in 
March, there will be a lot of urgent patching to do.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://www.febo.com/pipermail/time-nuts/attachments/20160720/a115f269/attachment.sig>

More information about the time-nuts mailing list