1 {-# LANGUAGE FlexibleContexts #-}
2 module Data.Time.HTTP.Internal
8 import Data.Time.RFC1123.Internal
9 import Data.Time.RFC733.Internal
10 import Data.Time.Asctime.Internal
12 -- |This is a parsec parser for date and time formats allowed in
13 -- HTTP\/1.1 (RFC 2616).
14 rfc2616DateAndTime :: Stream s m Char => ParsecT s u m UTCTime
16 = choice [ liftM zonedTimeToUTC $ try rfc1123DateAndTime
17 , liftM zonedTimeToUTC $ try rfc733DateAndTime
18 , liftM (localTimeToUTC utc) asctime