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, 22 Oct 2018 02:12:27 -0400	[thread overview]
Message-ID: <87va5u8q7o.fsf@netris.org> (raw)
In-Reply-To: <CAD2gp_R2AjkSY8fnB2UFHtKqT=63NSt66Fi3hQQ+1imE866WcQ@mail.gmail.com> (John Cowan's message of "Sun, 21 Oct 2018 22:38:55 -0400")

John Cowan <cowan@ccil.org> writes:

> On Sat, Oct 20, 2018 at 5:43 PM Mark H Weaver <mhw@netris.org> wrote:
>
>  If I understand correctly, 'time-utc->date' should never return a date
>  object with 60 in the seconds field, because those extra seconds have no
>  representation in time-utc.  They only have representations in time-tai
>  and time-monotonic.
>
> As I understand it, this is incorrect.  UTC days can contain either
> 86400 or 86401 seconds (or in principle a different number),

If you're talking about TAI seconds, then I agree.  However, the
'time-utc' representation in SRFI-19 is not a count of TAI seconds, but
rather a count _UTC_ seconds since the POSIX epoch.

Under the current "leap second" method of keeping UTC within 0.9 seconds
of UT1, UTC days contain either 86399, 86400, or 86401 _TAI_ seconds.
So far, all leap seconds have increased the TAI-UTC delta, but if the
(irregular) rotation rate of the Earth speeds up, we might some day need
a leap second that decreases the TAI-UTC delta.

Universal Time (UT) is not a measure of physical time, but rather is a
measure of the rotation angle of the Earth with respect to distant
quasars.  A UT second is identified with a fixed amount of rotation of
the Earth, which equals 1/86400 of a mean solar day.  That's why every
day has 86400 UT seconds.  UTC is kept within 0.9 seconds of UT1 (a
version of UT with certain corrections applied), so over long time
periods, with the leap seconds taken into account, UTC seconds are equal
to UT seconds.

       Mark





  reply	other threads:[~2018-10-22  6:12 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 [this message]
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
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=87va5u8q7o.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).