Skip to content
Snippets Groups Projects
Commit 793516d8 authored by rtoy's avatar rtoy
Browse files

Fix bug in parsing times. Things like "Tue Sep 7 18:56:57 UTC 2004"

were not parsed correctly because the "T" in Tue was being treated as
a date-time-divider.

Don't allow a date-time-divider to be at the start of the string.
parent 04f6e86b
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.13 2005/06/01 12:08:36 rtoy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/parse-time.lisp,v 1.14 2006/01/04 21:54:21 rtoy Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
...@@ -447,7 +447,9 @@ ...@@ -447,7 +447,9 @@
(prev-char (if (= string-index start) (prev-char (if (= string-index start)
nil nil
(char string (1- string-index))))) (char string (1- string-index)))))
(cond ((member next-char date-time-dividers :test #'char=) (cond ((and (/= string-index start)
(member next-char date-time-dividers :test #'char=))
;; A date-time-divider can't be at the start of the string.
(push (cons 'date-time-divider next-char) parts-list) (push (cons 'date-time-divider next-char) parts-list)
(incf string-index)) (incf string-index))
((alpha-char-p next-char) ((alpha-char-p next-char)
......
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