From 48c1f6b511bcd6d8ac5808df9917e9bf83ae889d Mon Sep 17 00:00:00 2001 From: Philipp Marek Date: Mon, 25 Apr 2022 13:14:07 +0200 Subject: [PATCH] Allow missing seconds, eg. with "2021-04-25T00:00+Z". --- src/local-time.lisp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/local-time.lisp b/src/local-time.lisp index 03feb62d..0625d9c5 100644 --- a/src/local-time.lisp +++ b/src/local-time.lisp @@ -1594,17 +1594,18 @@ The value of this variable should have the methods `local-time::clock-now', and (let* ((entry (second parts)) (start (car entry)) (end (cdr entry))) - (declare (type fixnum start end)) + ;(declare (type fixnum start end)) (passert (or zulup (not (zerop (- end start))))) (unless zulup (time-offset (second parts) sign)))))))) (partial-time (start-end) (with-parts-and-count ((car start-end) (cdr start-end) time-separator) - (passert (eql count 3)) + (passert (<= 2 count 3)) (time-hour (first parts)) (time-minute (second parts)) - (time-second (third parts)))) + (when (third parts) + (time-second (third parts))))) (time-hour (start-end) (parse-integer-into start-end hour 0 23)) (time-minute (start-end)