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



Reply via email to