[slime-devel] swank format-iso8601-time bug in non-integer timezones
Bob Halley
halley at play-bow.us
Mon Aug 7 08:04:10 UTC 2006
(resending, since I sent this from the wrong Sender id the first time...)
In format-iso8601-time in swank.lisp, the following code is used to
compute the timezone offset to print:
(multiple-value-bind (h m) (truncate (abs zone) 1.0)
;; Tricky. Sign of time zone is reversed in ISO 8601
;; relative to Common Lisp convention!
(format nil "~:[+~;-~]~2,'0D:~2,'0D"
(> zone 0) h (round m)))
(round m) does the wrong thing in timezones which are not integers.
E.g. at the moment I am in Adelaide, Australia, and the timezone is
+09:30, which corresponds to a Common Lisp timezone value of -19/2. As
written the code prints my timezone as +09:00. Rather than (round m),
we want (round (* m 60)).
Regards,
/Bob
P.S. Slime rocks, thanks! :)
More information about the slime-devel
mailing list