From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#22034: time-utc->date shows bogus zone-dependent leap second Date: Mon, 22 Oct 2018 02:12:27 -0400 Message-ID: <87va5u8q7o.fsf@netris.org> References: <20151127195146.GB28472@fysh.org> <87a7n847o5.fsf@netris.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1540188668 10497 195.159.176.226 (22 Oct 2018 06:11:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 Oct 2018 06:11:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: zefram@fysh.org, 22034@debbugs.gnu.org, 22034-done@debbugs.gnu.org To: John Cowan Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Oct 22 08:11:04 2018 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gETQd-0002dG-Oc for guile-bugs@m.gmane.org; Mon, 22 Oct 2018 08:11:03 +0200 Original-Received: from localhost ([::1]:33190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gETSj-0001zK-OY for guile-bugs@m.gmane.org; Mon, 22 Oct 2018 02:13:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gETSd-0001z8-2G for bug-guile@gnu.org; Mon, 22 Oct 2018 02:13:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gETSY-00077P-To for bug-guile@gnu.org; Mon, 22 Oct 2018 02:13:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59008) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gETSY-00077D-L7 for bug-guile@gnu.org; Mon, 22 Oct 2018 02:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gETSY-0002pm-9y for bug-guile@gnu.org; Mon, 22 Oct 2018 02:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 22 Oct 2018 06:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22034 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 22034-submit@debbugs.gnu.org id=B22034.154018876810869 (code B ref 22034); Mon, 22 Oct 2018 06:13:02 +0000 Original-Received: (at 22034) by debbugs.gnu.org; 22 Oct 2018 06:12:48 +0000 Original-Received: from localhost ([127.0.0.1]:35033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gETSJ-0002p9-N5 for submit@debbugs.gnu.org; Mon, 22 Oct 2018 02:12:47 -0400 Original-Received: from world.peace.net ([64.112.178.59]:53370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gETSI-0002oq-8V; Mon, 22 Oct 2018 02:12:46 -0400 Original-Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gETSC-0007zE-IC; Mon, 22 Oct 2018 02:12:40 -0400 In-Reply-To: (John Cowan's message of "Sun, 21 Oct 2018 22:38:55 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9239 Archived-At: John Cowan writes: > On Sat, Oct 20, 2018 at 5:43 PM Mark H Weaver 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