GNU bug report logs - #26633
TAI<->UTC conversion botches pre-1961 era

Previous Next

Package: guile;

Reported by: Zefram <zefram <at> fysh.org>

Date: Mon, 24 Apr 2017 01:17:01 UTC

Severity: normal

To reply to this bug, email your comments to 26633 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#26633; Package guile. (Mon, 24 Apr 2017 01:17:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Zefram <zefram <at> fysh.org>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Mon, 24 Apr 2017 01:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Zefram <zefram <at> fysh.org>
To: bug-guile <at> gnu.org
Subject: TAI<->UTC conversion botches pre-1961 era
Date: Mon, 24 Apr 2017 02:16:42 +0100
Asking SRFI-19 to perform a UTC-to-TAI conversion for an ordinary day
in 1960:

scheme@(guile-user)> (use-modules (srfi srfi-19))
scheme@(guile-user)> (time-utc->time-tai (date->time-utc (make-date 0 0 0 12 14 3 1960 0)))
$1 = #<time type: time-tai nanosecond: 0 second: -309268800>

The answer given is incorrect.  Unlike previous conversion bugs where it
was necessary to perform some arithmetic to reveal that the conversion
had gone wrong, in this case the answer can be declared wrong without any
detailed interpretation of the TAI time structure.  It is incorrect for
this conversion to return any specific TAI time, upon which arithmetic
could be performed, because UTC is not defined for any time prior to 1961.
The only sane behaviour is for the conversion to signal an error.

The same goes for time-tai->time-utc, which at present accurately inverts
time-utc->time-tai for the above time.

-zefram




This bug report was last modified 8 years and 52 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.