On Tue Jan 8 01:32:04 UTC 2019, Paul Eggert wrote:> In the meantime perhaps we could forge the NIST leap-seconds.list file
(including a comment that it's a forgery and why we're doing the forgery), and then substitute the real thing whenever it shows up. I'd rather have a script to do that than do it by hand, though. We'd need that script anyway if we start basing our distribution on the IERS file, as so many users now grab the NIST file from us rather than from the NIST.Your wish is my command....
# -=*( This file is in the public domain )*=- # This NTP leap-second file was created with data obtained from # the United States Naval Observatory (USNO) MAIA FTP server. # # Find it at: <ftp://maia.usno.navy.mil/ser7/leapsec.dat> # Updated using information from IERS Bulletin C 57 (7 Jan 2019) # Found at <ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat> # # This file is not a forgery, per se, but it is created # by some one/thing other than a national metrology lab. # It is necessitated by a current US government shutdown # and the resulting lack of an NIST generated file. # # UTC is a time scale based upon standard international (SI) # seconds and derived from Temps Atomique International (TAI). # # Leap seconds are an official correction to UTC to keep it # within 0.9 seconds of UT1; yet another time standard # based upon the orientation of the earth in space. # # These data, kept in "leap-seconds.list", are used by the # Network Time Protocol daemon (NTPd) to determine when to # apply leap seconds to Coordinated Universal Time (UTC). # "leap-seconds.list" is a symbolic link to the actual # file name, leap-seconds.xxxxxxxxxx, where xxxxxxxxxx # is derived from the NTP update timestamp (below). # # Theoretically, a leap second may be positive or negative. # Realistically, negative leap seconds are unlikely to occur. # # All timestamps in this leap seconds file are encoded using the # NTP epoch. These timestamps represent the number of seconds # since 1 Jan 1900 0:00:00. This is Modified Julian Date (MJD) # 15020 and Julian Date 2415020.5. There will be an unsigned # 32-bit overflow to the second NTP era in 2036 (07 Feb 2036 # 06:28:16 UTC to be precise). # # A leap second datum consists of an NTP timestamp and the # number of seconds difference between TAI and UTC (e.g. # currently TAI-UTC is 37). UTC was established at midnight on # 1 Jan 1972 with TAI-UTC started at 10. There was no mechanism # prior to that time defining when to apply leap seconds. # # Note: the first datum in the leap-seconds.list file is *not* # a leap-second; it denotes the definition of the UTC timescale. # # Leap-seconds rules are establish in: # # International Telecommunications Union-Regulation (ITU-R) # 460-6, Annex 1, Section 2. # # <http://www.itu.int/rec/R-REC-TF.460-6-200202-I/> # # NTP Leap second files have an update time (#$). This is often # the UTC zero (0) hour time of the day when the leap second file # is built. It should be updated whenever a new IERS Bulletin C # is issued. # #$ 3755808000 # # Leap second data have a lifetime. Traditionally, this ends on # the twenty-eighth (28) day of the month six months after the # period of time described in the latest IERS Bulletin C. This # is the expiry time (#@). # #@ 3786480000 # # Leap second files have a hash, as define in NIST's FIPS 180 # Secure Hash Standard (SHS), current revision 4 (FIPS 180-4). # # FIPS Publications: <http://csrc.nist.gov/publications/fips/> # Direct Link: <http://dx.doi.org/10.6028/NIST.FIPS.180-4> # # It is based on an SHA[1] digest, created using the data # portions of the file including leap second data and the update # and expiry timestamps. All "white space" and comments are # excluded in the computation thereof. The 160-bit SHA[1] # digest polynomial are encoded in five hexadecimal grouping at # the end of the file (#h). The hash itself is NOT included in # the SHA[1]. It can also be calculated using GNU sha1sum which # generates the same 160-bit digest, given the same data, in # forty hexadecimal characters. # # NTP delta #timestamp T sign Date of Change 2272060800 10 # + : 1 Jan 1972 (MJD 41317) 2287785600 11 # + : 1 Jul 1972 (MJD 41499) 2303683200 12 # + : 1 Jan 1973 (MJD 41683) 2335219200 13 # + : 1 Jan 1974 (MJD 42048) 2366755200 14 # + : 1 Jan 1975 (MJD 42413) 2398291200 15 # + : 1 Jan 1976 (MJD 42778) 2429913600 16 # + : 1 Jan 1977 (MJD 43144) 2461449600 17 # + : 1 Jan 1978 (MJD 43509) 2492985600 18 # + : 1 Jan 1979 (MJD 43874) 2524521600 19 # + : 1 Jan 1980 (MJD 44239) 2571782400 20 # + : 1 Jul 1981 (MJD 44786) 2603318400 21 # + : 1 Jul 1982 (MJD 45151) 2634854400 22 # + : 1 Jul 1983 (MJD 45516) 2698012800 23 # + : 1 Jul 1985 (MJD 46247) 2776982400 24 # + : 1 Jan 1988 (MJD 47161) 2840140800 25 # + : 1 Jan 1990 (MJD 47892) 2871676800 26 # + : 1 Jan 1991 (MJD 48257) 2918937600 27 # + : 1 Jul 1992 (MJD 48804) 2950473600 28 # + : 1 Jul 1993 (MJD 49169) 2982009600 29 # + : 1 Jul 1994 (MJD 49534) 3029443200 30 # + : 1 Jan 1996 (MJD 50083) 3076704000 31 # + : 1 Jul 1997 (MJD 50630) 3124137600 32 # + : 1 Jan 1999 (MJD 51179) 3345062400 33 # + : 1 Jan 2006 (MJD 53736) 3439756800 34 # + : 1 Jan 2009 (MJD 54832) 3550089600 35 # + : 1 Jul 2012 (MJD 56109) 3644697600 36 # + : 1 Jul 2015 (MJD 57204) 3692217600 37 # + : 1 Jan 2017 (MJD 57754) # #h ffee5390 2e3cf253 e15b646e 01768a18 e83785c3
Thanks. Could you reformat that so that it's more obvious to a casual reader that only the expiration date has changed? For example, if we installed that leap-seconds.list file as-is we'd change this data line: 3692217600<tab>37<tab># 1 Jan 2017 to this: 3692217600<tab>37 # + : 1 Jan 2017 (MJD 57754) and this change to the format will mess up leapseconds.awk. Obviously we can fix up leapseconds.awk to deal with this, but I worry that the format change will also mess up downstream programs too (notably NTP-related), and I'd rather keep the format as-is unless there's a compelling reason to change it. Also, as I recall you have a program that can generate the file; if it's OK with you to put it into the public domain, it'd be helpful to distribute that program too.
participants (2)
-
Chris Woodbury -
Paul Eggert