-
Notifications
You must be signed in to change notification settings - Fork 52
Description
The pre-1972 _changes are approximated to
Example (After #91 fixed)
>>> from astropy.time import Time, TimeDelta
>>> t = Time('1971-12-31 23:59:60.107757999', format = 'iso', scale = 'utc', precision = 9)
>>> t
<Time object: scale='utc' format='iso' value=1971-12-31 23:59:60.107757999>
>>> t.tai
<Time object: scale='tai' format='iso' value=1972-01-01 00:00:10.000000002>
In theory, it should be earlier than 1972-01-01 00:00:10, for 1972-01-01 00:00:00 UTC = 1972-01-01 00:00:10 TAI and the step was -0.1077580 s.
And the method of detecting jump is also inexact.
/* Separate TAI-UTC change into per-day (DLOD) and any jump (DLEAP). */
dlod = 2.0 * (dat12 - dat0);
dleap = dat24 - (dat0 + dlod);
The end of a day may not be 24:00:00 but 24:00:00+dleap.
So
Interestingly, this inexact method just matches dleap is calculated correctly (just a coincidence).
So the table _changes and the method of detecting jump may need to be modified at the same time.
| Date | TAI-UTC |
|---|---|
| 1960-01-01 | |
| 1961-01-01 | |
| 1961-08-01 | |
| 1962-01-01 | |
| 1963-11-01 | |
| 1964-01-01 | |
| 1964-04-01 | |
| 1964-09-01 | |
| 1965-01-01 | |
| 1965-03-01 | |
| 1965-07-01 | |
| 1965-09-01 | |
| 1966-01-01 | |
| 1968-02-01 |
/* Dates and Delta(AT)s */
static const eraLEAPSECOND _changes[] = {
{ 1960, 1, 1.41781799014226 },
{ 1961, 1, 1.42281799021726 },
{ 1961, 8, 1.37281798946726 },
{ 1962, 1, 1.84585798946726 },
{ 1963, 11, 1.94585799076726 },
{ 1964, 1, 3.24012999076726 },
{ 1964, 4, 3.34012999226726 },
{ 1964, 9, 3.44012999376726 },
{ 1965, 1, 3.54012999526726 },
{ 1965, 3, 3.64012999676726 },
{ 1965, 7, 3.74012999826726 },
{ 1965, 9, 3.84012999976726 },
{ 1966, 1, 4.31316999976726 },
{ 1968, 2, 4.21316999676726 },
{ 1972, 1, 10.0 },
{ 1972, 7, 11.0 },
{ 1973, 1, 12.0 },
{ 1974, 1, 13.0 },
{ 1975, 1, 14.0 },
{ 1976, 1, 15.0 },
{ 1977, 1, 16.0 },
{ 1978, 1, 17.0 },
{ 1979, 1, 18.0 },
{ 1980, 1, 19.0 },
{ 1981, 7, 20.0 },
{ 1982, 7, 21.0 },
{ 1983, 7, 22.0 },
{ 1985, 7, 23.0 },
{ 1988, 1, 24.0 },
{ 1990, 1, 25.0 },
{ 1991, 1, 26.0 },
{ 1992, 7, 27.0 },
{ 1993, 7, 28.0 },
{ 1994, 7, 29.0 },
{ 1996, 1, 30.0 },
{ 1997, 7, 31.0 },
{ 1999, 1, 32.0 },
{ 2006, 1, 33.0 },
{ 2009, 1, 34.0 },
{ 2012, 7, 35.0 },
{ 2015, 7, 36.0 },
{ 2017, 1, 37.0 }
};