Skip to content
Snippets Groups Projects
Commit 1e896049 authored by gerd's avatar gerd
Browse files

(ext:parse-time "Fri, 04 Apr 2003 01:36:12 0200")

	 => 3258488172
	(ext:parse-time "Fri, 04 Apr 2003 01:36:12 +0200")
	 => nil

	* src/code/parse-time.lisp (decompose-string): Handle
	offsets from GMT with a leading +.  From Miles Egan.
	Reported by Dan Barlow.
parent 6e1936c2
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/parse-time.lisp,v 1.10 2003/08/16 11:45:47 gerd Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/parse-time.lisp,v 1.11 2003/08/29 19:22:32 gerd Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
...@@ -461,13 +461,13 @@ ...@@ -461,13 +461,13 @@
(setf numeric-value (- numeric-value))) (setf numeric-value (- numeric-value)))
(push numeric-value parts-list) (push numeric-value parts-list)
(setf string-index scan-index)))) (setf string-index scan-index))))
((and (char= next-char #\-) ((and (member next-char '(#\+ #\-) :test #'char=)
(or (not prev-char) (or (not prev-char)
(member prev-char whitespace-chars :test #'char=))) (member prev-char whitespace-chars :test #'char=)))
;; If we see a minus sign before a number, but not after one, ;; If we see a minus or plus sign before a number, but
;; it is not a date divider, but a negative offset from GMT, so ;; not after one, it is not a date divider, but a offset
;; set next-negative to t and continue. ;; from GMT, so set next-negative to t if minus and continue.
(setf next-negative t) (setq next-negative (char= next-char #\-))
(incf string-index)) (incf string-index))
((member next-char time-dividers :test #'char=) ((member next-char time-dividers :test #'char=)
;; Time-divider - add it to the parts-list with symbol. ;; Time-divider - add it to the parts-list with symbol.
......
...@@ -168,6 +168,7 @@ New in this release: ...@@ -168,6 +168,7 @@ New in this release:
COMPACT-INFO-LOOKUP for hash values equal to MOST-POSITIVE-FIXNUM. COMPACT-INFO-LOOKUP for hash values equal to MOST-POSITIVE-FIXNUM.
- FFLOOR and FCEILING return types sometimes being inferred as - FFLOOR and FCEILING return types sometimes being inferred as
being the nil type. being the nil type.
- PARSE-TIME accepting GMT offsets with a leading plus sign.
* Other changes: * Other changes:
- CREATE-REQUEST-SERVER has an additional :reuse-address keyword - CREATE-REQUEST-SERVER has an additional :reuse-address keyword
......
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