Perhaps Arthur David Olson or Bradley White can take a look at this, as they're the leap second gurus for tz. I've never tested negative leap seconds.
Using 23:59:59 for a negative leap second seems to do the right thing, as witness the typescript at the bottom of this message. @dashdashado Script started on Fri, Apr 7, 2017 2:37:27 PM $ grep 2020 leapseconds Leap 2020 Jun 30 23:59:59 - S $ make install TOPDIR=$PWD/tmp REDO=right_only >&- $ ./zdump -v America/New_York | grep 2020 America/New_York Sun Mar 8 06:59:59 2020 UT = Sun Mar 8 01:59:59 2020 EST isdst=0 gmtoff=-18000 America/New_York Sun Mar 8 07:00:00 2020 UT = Sun Mar 8 03:00:00 2020 EDT isdst=1 gmtoff=-14400 America/New_York Tue Jun 30 23:59:58 2020 UT = Tue Jun 30 19:59:58 2020 EDT isdst=1 gmtoff=-14400 America/New_York Wed Jul 1 00:00:00 2020 UT = Tue Jun 30 20:00:00 2020 EDT isdst=1 gmtoff=-14400 America/New_York Sun Nov 1 05:59:59 2020 UT = Sun Nov 1 01:59:59 2020 EDT isdst=1 gmtoff=-14400 America/New_York Sun Nov 1 06:00:00 2020 UT = Sun Nov 1 01:00:00 2020 EST isdst=0 gmtoff=-18000 $ exit exit Script done on Fri, Apr 7, 2017 2:38:11 PM On Tue, Apr 4, 2017 at 6:33 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:
On 04/04/2017 09:02 AM, Chris Woodbury via tz wrote:
I reviewed the C code and, it seems to me, the transaction added should actually be for the second before, 23:59:58, as the transaction itself causes 23:59:59 to be skippedaltogether.
Perhaps Arthur David Olson or Bradley White can take a look at this, as they're the leap second gurus for tz. I've never tested negative leap seconds.
Also, I've an AWK script that uses the IERS file Leap_Seconds.dat
rather than the NIST leap-seconds.listfile.
Although that would be a better technical solution, in the past we've shied away from it because the IERS file is copyrighted and we and we and our downstream users don't clearly have permissions to copy and redistribute it.
USNO MAIA also has straight list
of leap-seconds in a different format. <http://maia.usno.navy.mil/ser 7/leapsec.dat>
Thanks, I was not aware of this file. It is public-domain, so perhaps we could use it. Is it updated in a timely fashion when new IERS bulletins are published? And is that web server highly available? These have been sticking points for the NIST file.
Another good, comprehensive article is "The leap second: its history
and possible future" by R.A. Nelson, et al, from Metrogia Vol 38, pp. 509-529 (2001). PDF available (with permission) at:
<https://www.cl.cam.ac.uk/~mgk25/time/metrologia-leapsecond.pdf>
Yes, we link to that in tz-link.htm.