unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: John Cowan <cowan@ccil.org>
Cc: zefram@fysh.org, 22034@debbugs.gnu.org, 22034-done@debbugs.gnu.org
Subject: bug#22034: time-utc->date shows bogus zone-dependent leap second
Date: Mon, 29 Oct 2018 03:16:19 -0400	[thread overview]
Message-ID: <87a7mx8boh.fsf@netris.org> (raw)
In-Reply-To: <CAD2gp_QDO7poKJ9O7Zd0mufzZjeyD9eiZPd_sZzURYOdh+kwag@mail.gmail.com> (John Cowan's message of "Sun, 28 Oct 2018 19:58:03 -0400")

Hi John,

John Cowan <cowan@ccil.org> writes:

> On Sun, Oct 28, 2018 at 4:40 PM Mark H Weaver <mhw@netris.org> wrote:
>
>  The difference between the two measuring tapes is that they assign
>  different numbers to the markings, and moreover that the UTC analogue
>  has a small handful of places where two adjacent markings have the same
>  number assigned, and all subsequent numbers are shifted by 1.
>
> Now I think you are entirely right here, modulo a single term: what you are
> calling "UTC", I call (and I think correctly), "Posix".  It is Posix time that
> has two identical adjacent markings.
>
>    126230400 |------------
>    126230400 |------------
>
> The numbers here are not UTC seconds since the Epoch, but Posix seconds
> since the Epoch.

Here's a more detailed display of the same leap second that I chose for
my example, which you quoted above:

+-----------------------------------------------------------+
|      TAI seconds  UTC seconds                             |
|         since       since                                 |
|     midnight UTC  midnight UTC                            |
|      1 Jan 1970   1 Jan 1970    Result of 'time-tai->date'|
|-----------------------------------------------------------|
|$2 = ((126230410    126230398    "1973-12-31T23:59:58Z")   |
|      (126230411    126230399    "1973-12-31T23:59:59Z")   |
|      (126230412    126230400    "1973-12-31T23:59:60Z")   |
|      (126230413    126230400    "1974-01-01T00:00:00Z")   |
|      (126230414    126230401    "1974-01-01T00:00:01Z"))  |
+-----------------------------------------------------------+

The table above illustrates my understanding of the relationship between
"TAI seconds since midnight UTC on 1 Jan 1970", "UTC seconds since
midnight UTC on 1 Jan 1970" and the date object expressed in UTC.  See
my previous email for the code to produce the table above using SRFI-19.

If I understand correctly, based on your last sentence that I quoted
above, you believe that the numbers I've given in the second column are
not UTC seconds since the epoch, and that there is confusion here
between UTC seconds and Posix seconds.

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.

If the table above is incorrect, then it would be good to report the
problem to the SRFI-19 mailing list, because the current SRFI-19
reference implementation produces the same table.

     Thanks,
       Mark





  reply	other threads:[~2018-10-29  7:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27 19:51 bug#22034: time-utc->date shows bogus zone-dependent leap second Zefram
2018-10-20 21:42 ` Mark H Weaver
2018-10-22  2:38   ` John Cowan
2018-10-22  6:12     ` Mark H Weaver
2018-10-25 22:21       ` John Cowan
2018-10-28 20:39         ` Mark H Weaver
2018-10-28 23:58           ` John Cowan
2018-10-29  7:16             ` Mark H Weaver [this message]
2018-10-29 22:33               ` Mark H Weaver
2018-10-30  0:23               ` John Cowan
2018-10-30  2:12                 ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a7mx8boh.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=22034-done@debbugs.gnu.org \
    --cc=22034@debbugs.gnu.org \
    --cc=cowan@ccil.org \
    --cc=zefram@fysh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).