import Data.Time.HTTP.Common
import Text.Parsec
-
+-- |This is a parsec parser for RFC 733 date and time strings.
rfc733DateAndTime :: Stream s m Char => ParsecT s u m ZonedTime
rfc733DateAndTime = dateTime
<|>
liftM (+ 1900) read2
_ <- char ' '
- assertGregorianDateIsGood (toInteger year) month day
+ assertGregorianDateIsGood year month day
time :: Stream s m Char => ParsecT s u m (TimeOfDay, TimeZone)
time = do tod <- hour
- _ <- char ' '
+ _ <- char '-' <|> char ' '
tz <- zone
return (tod, tz)