Re: [tz] [PROPOSED] Improve leapseconds support
eggert@cs.ucla.edu said:
* NEWS, leapseconds.awk: Add support for leap seconds at the ends of months other than June and December.
A leap second other than June or December is probably an error in the input data. I would leave the check and add a big comment. Maybe write the code so that it is a simple edit to disable the check. I think there is provision for an intermediate stage between Jun/Dec and every month. Apr/Jun/Sep/Dec. -- These are my opinions. I hate spam.
On Sat 2018-10-06T13:44:20-0700 Hal Murray hath writ:
A leap second other than June or December is probably an error in the input data.
This is definitely true in this era. Assuming (bad thing to do) that rotation of the crust does not undergo another strong deceleration the two dates per year should be enough for the next 40 years. In short, it is dangerous for code to accept a leap second on any date other than June 30 and December 31.
I would leave the check and add a big comment. Maybe write the code so that it is a simple edit to disable the check.
I think there is provision for an intermediate stage between Jun/Dec and every month. Apr/Jun/Sep/Dec.
The active rec from ITU-R is version 6 (2002) http://www.itu.int/rec/R-REC-TF.460/en "A positive or negative leap-second should be the last second of a UTC month, but first preference should be given to the end of December and June, and second preference to the end of March and September." This is the current evolution of the initial instructions in CCIR Report 517 (Question 1/7, Resolution 53) (1971) that was reprinted on page 32 of NBS Monograph 140 https://nvlpubs.nist.gov/nistpubs/Legacy/MONO/nbsmonograph140.pdf "A positive or negative leap second, when required, should be the last second of a UTC month, preferably 31 December and/or 30 June." That was modified in 1973 by the 15th IAU GA https://www.iau.org/static/resolutions/IAU1973_French.pdf who were watching the extreme deceleration of earth rotation in the early 1970s and said "if the present trend of the rotation of the earth continues, it will become impossible to maintain UTC within the present limits by the insertion of leap seconds on two preferred dates only" But even as they were making that resolution the earth was speeding up considerably, so their fears were premature. But all of those were unfunded mandates laying extra responsibility for international implementation on a perennially underfunded agency which ceased to exist in 1988. Note in particular that the perennially underfunded sucessor agency who inherited this responsibility has not incorporated any changes to their operational mandate since version 4 in 1986 ftp://hpiers.obspm.fr/iers/bul/bulc/BULLETINC.GUIDE -- Steve Allen <sla@ucolick.org> WGS-84 (GPS) UCO/Lick Observatory--ISB 260 Natural Sciences II, Room 165 Lat +36.99855 1156 High Street Voice: +1 831 459 3046 Lng -122.06015 Santa Cruz, CA 95064 http://www.ucolick.org/~sla/ Hgt +250 m
Hal Murray writes:
A leap second other than June or December is probably an error in the input data.
Only if the input is intended to be the current official list of leap seconds. The recent code change was intended to make the code match the official rules better, which lets us better test software on outlandish-but-valid input. It's like the long-existing tzdb code that supports negative leap seconds, something that would also be an input error in data intended to be the official list. Steve Allen wrote:
This is definitely true in this era. Assuming (bad thing to do) that rotation of the crust does not undergo another strong deceleration the two dates per year should be enough for the next 40 years.
My eyeballing of the "extrapolated long-term trend" of Figure 18 of Stephenson et al. 2016 says that 2 leap seconds per year should be enough until 2300 or so. This prediction is based entirely on historical data, though, and global warming is throwing another monkey wrench into such predictions. Although there's not a consensus on how global warming should affect length of day, you might be amused to read Mazzarella & Scafetta 2018, which reports that since 1850 the length of day has been negatively correlated with the global sea surface temperature, which suggests that global warming should mean that leap seconds will be rarer. If they're right, we may have to wait even longer than Stephenson et al. suggest before worrying about leap seconds other than June or December. Stephenson FR, Morrison LV, Hohenkerk CY. Measurement of the Earth's rotation: 720 BC to AD 2015. Proc Royal Soc A. 2016 Dec 7;472:20160404. https://dx.doi.org/10.1098/rspa.2016.0404 Mazzarella A, Scafetta N. The Little Ice Age was 1.0–1.5 °C cooler than current warm period according to LOD and NAO. Clim Dyn. 2018. https://doi.org/10.1007/s00382-018-4122-6
Perhaps accept leap seconds at the ends of months other than June or December, but issue a warning? (And similarly for negative leap seconds?) @dashdashado On Sat, Oct 6, 2018 at 7:42 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
Hal Murray writes:
A leap second other than June or December is probably an error in the input data.
Only if the input is intended to be the current official list of leap seconds. The recent code change was intended to make the code match the official rules better, which lets us better test software on outlandish-but-valid input. It's like the long-existing tzdb code that supports negative leap seconds, something that would also be an input error in data intended to be the official list.
Steve Allen wrote:
This is definitely true in this era. Assuming (bad thing to do) that rotation of the crust does not undergo another strong deceleration the two dates per year should be enough for the next 40 years.
My eyeballing of the "extrapolated long-term trend" of Figure 18 of Stephenson et al. 2016 says that 2 leap seconds per year should be enough until 2300 or so.
This prediction is based entirely on historical data, though, and global warming is throwing another monkey wrench into such predictions. Although there's not a consensus on how global warming should affect length of day, you might be amused to read Mazzarella & Scafetta 2018, which reports that since 1850 the length of day has been negatively correlated with the global sea surface temperature, which suggests that global warming should mean that leap seconds will be rarer. If they're right, we may have to wait even longer than Stephenson et al. suggest before worrying about leap seconds other than June or December.
Stephenson FR, Morrison LV, Hohenkerk CY. Measurement of the Earth's rotation: 720 BC to AD 2015. Proc Royal Soc A. 2016 Dec 7;472:20160404. https://dx.doi.org/10.1098/rspa.2016.0404
Mazzarella A, Scafetta N. The Little Ice Age was 1.0–1.5 °C cooler than current warm period according to LOD and NAO. Clim Dyn. 2018. https://doi.org/10.1007/s00382-018-4122-6
Arthur David Olson wrote:
Perhaps accept leap seconds at the ends of months other than June or December, but issue a warning? (And similarly for negative leap seconds?)
Although we could, there's lots of other stuff the script could check for, such as dates like "6 Oct 2018" (or "1 Winterfilth, SR 1453"...). Having the script properly validate its input (much less warn about implausible input) would significantly complicate it. If someone were to write such a validation I suppose we would accept it, but given the script's intended use I would give the project low priority. A better line of attack (if someone wants to volunteer) would be for the script to parse the input data instead of scraping dates from comments in the input. Parsing the comments, as we do now, is surely asking for trouble. For example, in this input line: 3692217600 37 # 1 Jan 2017 the script currently ignores the 3692217600 which is the actual data, and parses the "1 Jan 2017". Eeeuuw. Chris Woodbury recently sent me a patch to parse the data, but unfortunately his patch relied heavily on nonportable GNU extensions and I'd rather stick with plain POSIX tools. Chris also suggested that we stop using the NIST file entirely and switch to the USNO format; however that would rattle many of our downstream users, and it would possibly make the stick-with-POSIX approach even harder.
On 2018-10-06 18:12, Paul Eggert wrote:
Arthur David Olson wrote:
Perhaps accept leap seconds at the ends of months other than June or December, but issue a warning? (And similarly for negative leap seconds?)
Although we could, there's lots of other stuff the script could check for, such as dates like "6 Oct 2018" (or "1 Winterfilth, SR 1453"...). Having the script properly validate its input (much less warn about implausible input) would significantly complicate it. If someone were to write such a validation I suppose we would accept it, but given the script's intended use I would give the project low priority.
A better line of attack (if someone wants to volunteer) would be for the script to parse the input data instead of scraping dates from comments in the input. Parsing the comments, as we do now, is surely asking for trouble. For example, in this input line:
3692217600 37 # 1 Jan 2017
the script currently ignores the 3692217600 which is the actual data, and parses the "1 Jan 2017". Eeeuuw.
Chris Woodbury recently sent me a patch to parse the data, but unfortunately his patch relied heavily on nonportable GNU extensions and I'd rather stick with plain POSIX tools. Chris also suggested that we stop using the NIST file entirely and switch to the USNO format; however that would rattle many of our downstream users, and it would possibly make the stick-with-POSIX approach even harder.
NTP times can be easily parsed, converted, and formatted using the NTP epoch with date -d "1900-01-01 00:00:00+000 + $NTPtime seconds": the attached script checks the SHA1, converts, and reports the dates: bashisms allow easy param pattern content cleanup, but could be replaced. The script is adhoc, but adequate with wrappers run weekdays for the first couple of weeks every six months, to get, check, and update /etc/leap-seconds.list from sources, and run processes. USNO also provides leap-seconds files in NTP format from: ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.* where leap-seconds.list is a symlink to leap-seconds.# and # is the update NTP time e.g. 3739787886. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised.
Brian Inglis wrote:
NTP times can be easily parsed, converted, and formatted using the NTP epoch with date -d "1900-01-01 00:00:00+000 + $NTPtime seconds"
Yes, and Chris's script did something along those lines as well. However, that usage of the 'date' command relies on a GNU extension, and the script also uses the sha1sum command, another GNU extension. Although I develop on GNU/Linux and so these usages are not a problem for me, I'd rather the script be kept portable to any POSIX platform as much as possible.
On Sat 2018-10-06T16:42:23-0700 Paul Eggert hath writ:
Steve Allen wrote:
This is definitely true in this era. Assuming (bad thing to do) that rotation of the crust does not undergo another strong deceleration the two dates per year should be enough for the next 40 years.
My eyeballing of the "extrapolated long-term trend" of Figure 18 of Stephenson et al. 2016 says that 2 leap seconds per year should be enough until 2300 or so.
The red band is the long term average, and two leap seconds per year is an excess LOD of about 5.4 ms, so that shows around year 2100. The green curve should be taken with a huge grain of salt because none of the decadal fluctuations are mapped prior to the 1800s. https://link.springer.com/article/10.1007/s00190-006-0067-3 Huber, P.J. J Geodesy (2006) 80: 283. https://doi.org/10.1007/s00190-006-0067-3 Huber argued that it is possible that the fluctuations of the green curve are entirely a stochastic artifact of the poor sampling afforded by the old eclipse records. Look carefully at the measured LOD and see that 100 years ago the earth was spinning slower than it is now, and slower than it was in 1972. The decadal fluctuations demonstrate that the torques caused by weather in the core/mantle boundary are huge by comparison to any geophysics beside impact with another planet. If another large decadal fluctuation slowdown happens there could be more than two leap seconds per year during this century. -- Steve Allen <sla@ucolick.org> WGS-84 (GPS) UCO/Lick Observatory--ISB 260 Natural Sciences II, Room 165 Lat +36.99855 1156 High Street Voice: +1 831 459 3046 Lng -122.06015 Santa Cruz, CA 95064 http://www.ucolick.org/~sla/ Hgt +250 m
participants (5)
-
Arthur David Olson -
Brian Inglis -
Hal Murray -
Paul Eggert -
Steve Allen