From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Zefram Newsgroups: gmane.lisp.guile.bugs Subject: bug#26632: TAI<->UTC conversion botches 1961 to 1971 Date: Tue, 6 Nov 2018 04:21:44 +0000 Message-ID: <20181106042144.rglcwbfdfmwo7dyc@fysh.org> References: <20170424010218.GL6765@fysh.org> <87zhv3yjhu.fsf@netris.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1541478010 21785 195.159.176.226 (6 Nov 2018 04:20:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Nov 2018 04:20:10 +0000 (UTC) Cc: 26632@debbugs.gnu.org To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Nov 06 05:20:06 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 1gJsqS-0005W1-Ni for guile-bugs@m.gmane.org; Tue, 06 Nov 2018 05:20:04 +0100 Original-Received: from localhost ([::1]:38831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJssY-0008BK-Se for guile-bugs@m.gmane.org; Mon, 05 Nov 2018 23:22:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJssT-0008Aq-5H for bug-guile@gnu.org; Mon, 05 Nov 2018 23:22:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJssN-0004Q0-Ek for bug-guile@gnu.org; Mon, 05 Nov 2018 23:22:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59880) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJssM-0004OO-2O for bug-guile@gnu.org; Mon, 05 Nov 2018 23:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gJssL-0007Tb-SP for bug-guile@gnu.org; Mon, 05 Nov 2018 23:22:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Zefram Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 06 Nov 2018 04:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26632 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 26632-submit@debbugs.gnu.org id=B26632.154147811128723 (code B ref 26632); Tue, 06 Nov 2018 04:22:01 +0000 Original-Received: (at 26632) by debbugs.gnu.org; 6 Nov 2018 04:21:51 +0000 Original-Received: from localhost ([127.0.0.1]:35905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJssB-0007TC-5x for submit@debbugs.gnu.org; Mon, 05 Nov 2018 23:21:51 -0500 Original-Received: from river.fysh.org ([87.98.248.19]:36247 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJss9-0007T4-6N for 26632@debbugs.gnu.org; Mon, 05 Nov 2018 23:21:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=fysh.org; s=20170316; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=TPTkGLq96CT9m6CXLf2GUACkVLIV+1vaSVr1BfulrLc=; b=WJ6dnYuheKYYcC0cB5PjqbzCI5 M3uYvBRNK+AGWrBIWktFmknnCqQpHX/fQ3L2q5Iq0WM9SHcXEnduUli6bz39XkMWRuBkxpfAKxWqH 4s2O2k26w7GVTRW2OL5j5ZUG2PS/GdFztaqiA80iJx13JxRkyTtYN3aoElqt1hR0mT8M=; Original-Received: from zefram by river.fysh.org with local (Exim 4.89 #1 (Debian)) id 1gJss4-00040y-3X; Tue, 06 Nov 2018 04:21:44 +0000 Content-Disposition: inline In-Reply-To: <87zhv3yjhu.fsf@netris.org> 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:9260 Archived-At: Mark H Weaver wrote: >patch adds the TAI-UTC tables for 1961-1971 and uses them to implement >TAI<->UTC conversions over that time range with nanosecond accuracy. On a quick inspection of the code, that looks good. > I'm vaguely concerned about violating widely-held assumptions, >e.g. that UTC runs at the same rate as TAI If an application assumes that for pre-1972 times, then the application is broken. Note that any application currently using the srfi-19 library for pre-1972 TAI<->UTC conversions already has a bigger problem, in that it's getting false answers from the library. It's hard to see how fixing the library could make any previously-working program stop working. > which might cause some code on top of Guile to misbehave if >the system clock is set pre-1972, If the system clock is incorrect by decades, there will be many other problems to deal with. >I'm curious to hear opinions on this. My view is that this change should definitely be applied. But it's also worth thinking about what the alternative is, if the correct conversions are somehow too shocking for innocent programs to be exposed to them. Making no change isn't a realistic option: the library is producing false answers, which are no use to anyone. It's clearly a bug in the library, and needs to be addressed somehow. The only other defensible option would be to declare pre-1972 UTC out of scope for the library, having attempted conversions signal an error. That would have to be documented, and it seems like it would still amount to a deviation from the requirements of SRFI-19. -zefram