(let ((mjd (time-mjd date))
(sec (time-second date))
(usec (time-usec date)))
- (multiple-value-bind (usec-new sec)
+ (multiple-value-bind (sec-new usec-new)
(floor (+ usec
(* 1000000
(+ sec second
(* 60 minute)
(* 60 60 hour))))
1000000)
+ (declare (ignore sec-new))
(multiple-value-bind (mjd-new sec-new)
(floor sec (* 60 60 24))
(if destructive
(parse-integer string :start 17 :end 19)
0))
(cond
- ((or (char= #\, (char string 19))
- (char= #\. (char string 19)))
+ ((and (> strlen 19)
+ (or (char= #\, (char string 19))
+ (char= #\. (char string 19))))
(multiple-value-bind (parsed-usec usec-end)
(parse-integer string :start 20 :junk-allowed t)
(setf usec parsed-usec
:bad-component
(car (find-if (lambda (pair) (null (cdr pair)))
`((year . ,year) (month . ,month)
- (day . ,day) (hour ,hour)
- (minute ,minute) (second ,second)
- (timezone ,gmt-sec-offset)))))))))
+ (day . ,day) (hour . ,hour)
+ (minute . ,minute) (second . ,second)
+ (usec . ,usec)
+ (timezone . ,gmt-sec-offset)))))))))