Skip to content
Snippets Groups Projects
Commit 43cfdb9c authored by ram's avatar ram
Browse files

Fixed FORMAT-UNIVERSAL-TIME to not call DECODE-UNIVERSAL-TIME with a NIL

timezone arg, thus resulting in some undesirable type inferences.
parent f10b47c3
No related branches found
No related tags found
No related merge requests found
...@@ -73,11 +73,15 @@ ...@@ -73,11 +73,15 @@
(unless (integerp universal-time) (unless (integerp universal-time)
(error "~A: Universal-Time should be an integer." universal-time)) (error "~A: Universal-Time should be an integer." universal-time))
(when timezone (when timezone
(unless (and (integerp timezone) (<= 0 timezone 32)) (unless (and (rationalp timezone) (<= -24 timezone 24))
(error "~A: Timezone should be an integer between 0 and 32." (error "~A: Timezone should be a rational between -24 and 24." timezone))
timezone))) (unless (zerop (rem timezone 1/3600))
(error "~A: Timezone is not a second (1/3600) multiple." timezone)))
(multiple-value-bind (secs mins hours day month year dow dst tz) (multiple-value-bind (secs mins hours day month year dow dst tz)
(decode-universal-time universal-time timezone) (if timezone
(decode-universal-time universal-time timezone)
(decode-universal-time universal-time))
(declare (ignore dst) (fixnum secs mins hours day month year dow)) (declare (ignore dst) (fixnum secs mins hours day month year dow))
(let ((time-string "~2,'0D:~2,'0D") (let ((time-string "~2,'0D:~2,'0D")
(date-string (date-string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment