[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22034: time-utc->date shows bogus zone-dependent leap second
From: |
Mark H Weaver |
Subject: |
bug#22034: time-utc->date shows bogus zone-dependent leap second |
Date: |
Mon, 29 Oct 2018 22:12:19 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hi John,
John Cowan <address@hidden> writes:
> On Mon, Oct 29, 2018 at 3:17 AM Mark H Weaver <address@hidden> wrote:
>
> Can you please be more concrete and tell me what numbers you think
> should be in the second column, to properly reflect the column heading?
> I'm not asking for a prose description, but for the actual numbers.
>
> Here you go:
>
> +-------------------------------------------------------------------------+
> | TAI seconds UTC seconds Posix seconds |
> | since since since |
> | midnight TAI midnight UTC midnight UTC |
> | 1 Jan 1970 1 Jan 1970 1 Jan 1970 Result of 'time-tai->date' |
> |-------------------------------------------------------------------------|
> |$2 = ((126230410 126230398 126230398 "1973-12-31T23:59:58Z") |
> | (126230411 126230399 126230399 "1973-12-31T23:59:59Z") |
> | (126230412 126230400 126230400 "1973-12-31T23:59:60Z") |
> | (126230413 126230401 126230400 "1974-01-01T00:00:00Z") |
> | (126230414 126230402 126230401 "1974-01-01T00:00:01Z")) |
> +-------------------------------------------------------------------------+
Thank you, this is helpful.
> So as you see leap seconds are included in both the TAI and the UTC count,
> but not in the Posix count.
According to <http://maia.usno.navy.mil/ser7/tai-utc.dat>, the value of
TAI-UTC should change from 12 to 13 at JD 2442048.5, i.e. at midnight
UTC on 1 January 1974. The same fact is shown on the graph at the
bottom of this page:
http://jjy.nict.go.jp/mission/page1-e.html
In the values you proposed above, TAI-UTC is 12 uniformly throughout,
both before and after the leap second.
If you believe that TAI-UTC should not change at JD 2442048.5, then for
consistency, you should believe that it doesn't change at JD 2441683.5,
the previous leap second one year earlier:
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,pp (map (lambda (n)
(let* ((tai (make-time time-tai 0 n))
(utc (time-tai->time-utc tai)))
(list (time-second tai)
(time-second utc)
(date->string (time-tai->date tai 0)
"~4"))))
(iota 5 94694409))
$1 = ((94694409 94694398 "1972-12-31T23:59:58Z")
(94694410 94694399 "1972-12-31T23:59:59Z")
(94694411 94694400 "1972-12-31T23:59:60Z")
(94694412 94694400 "1973-01-01T00:00:00Z")
(94694413 94694401 "1973-01-01T00:00:01Z"))
--8<---------------cut here---------------end--------------->8---
If we apply the same changes here that you did above, with UTC=Posix at
the top and UTC=Posix+1 at the bottom, it would look like this:
> +-------------------------------------------------------------------------+
> | TAI seconds UTC seconds Posix seconds |
> | since since since |
> | midnight TAI midnight UTC midnight UTC |
> | 1 Jan 1970 1 Jan 1970 1 Jan 1970 Result of 'time-tai->date' |
> |-------------------------------------------------------------------------|
> |$2 = ((94694409 94694398 94694398 "1972-12-31T23:59:58Z") |
> | (94694410 94694399 94694399 "1972-12-31T23:59:59Z") |
> | (94694411 94694400 94694400 "1972-12-31T23:59:60Z") |
> | (94694412 94694401 94694400 "1973-01-01T00:00:00Z") |
> | (94694413 94694402 94694401 "1973-01-01T00:00:01Z")) |
> +-------------------------------------------------------------------------+
Is that a reasonable extrapolation of what you did?
Note that in the table above, TAI-UTC is 11 uniformly throughout. This
raises of the question of how to combine these two tables into a
coherent whole. In order to produce a larger table that includes both
of these excerpts and everything in between, TAI-UTC would need to
change from 11 to 12 somewhere in the middle.
Do you see the problem?
Would you like to make another suggestion of what values should go in
the second column of these two tables?
Thanks,
Mark
- bug#22034: time-utc->date shows bogus zone-dependent leap second, Mark H Weaver, 2018/10/20
- bug#22034: time-utc->date shows bogus zone-dependent leap second, John Cowan, 2018/10/21
- bug#22034: time-utc->date shows bogus zone-dependent leap second, Mark H Weaver, 2018/10/22
- bug#22034: time-utc->date shows bogus zone-dependent leap second, John Cowan, 2018/10/25
- bug#22034: time-utc->date shows bogus zone-dependent leap second, Mark H Weaver, 2018/10/28
- bug#22034: time-utc->date shows bogus zone-dependent leap second, John Cowan, 2018/10/28
- bug#22034: time-utc->date shows bogus zone-dependent leap second, Mark H Weaver, 2018/10/29
- bug#22034: time-utc->date shows bogus zone-dependent leap second, Mark H Weaver, 2018/10/29
- bug#22034: time-utc->date shows bogus zone-dependent leap second, John Cowan, 2018/10/29
- bug#22034: time-utc->date shows bogus zone-dependent leap second,
Mark H Weaver <=