diff --git a/basis/calendar/parser/parser-tests.factor b/basis/calendar/parser/parser-tests.factor index 9596cc4e6a..f0ef2025e9 100644 --- a/basis/calendar/parser/parser-tests.factor +++ b/basis/calendar/parser/parser-tests.factor @@ -153,6 +153,11 @@ IN: calendar.parser.tests now dup timestamp>rfc822 rfc822>timestamp time- 1 seconds before? ] unit-test -{ T{ timestamp f 2008 4 22 14 36 12 T{ duration f 0 0 0 0 0 0 } } } [ - "Tue, 22 Apr 2008 14:36:12 GMT" rfc822>timestamp +{ "Tue, 22 Apr 2008 14:36:12 GMT" } [ + "Tue, 22 Apr 2008 14:36:12 GMT" rfc822>timestamp timestamp>rfc822 +] unit-test + +{ "Tue, 22 Apr 2008 14:36:12 GMT" } [ + "Tue, 22 Apr 2008 14:36:12 GMT " + rfc822>timestamp timestamp>rfc822 ] unit-test diff --git a/basis/calendar/parser/parser.factor b/basis/calendar/parser/parser.factor index 5f0894cde6..6f5f341104 100644 --- a/basis/calendar/parser/parser.factor +++ b/basis/calendar/parser/parser.factor @@ -104,7 +104,7 @@ CONSTANT: rfc822-named-zones H{ ":" read-token checked-number >>hour ":" read-token checked-number >>minute read-sp checked-number >>second - readln parse-rfc822-gmt-offset >>gmt-offset ; + " " read-until drop parse-rfc822-gmt-offset >>gmt-offset ; : rfc822>timestamp ( str -- timestamp ) [ (rfc822>timestamp) ] with-string-reader ;