]> gitweb @ CieloNegro.org - time-http.git/blobdiff - Data/Time/RFC1123/Internal.hs
RFC822
[time-http.git] / Data / Time / RFC1123 / Internal.hs
index bfb03675e7b0128531d9d6903888361be2cbe9cb..9fd1e83247d55f556edc07e5fe001fbf48a0da2f 100644 (file)
@@ -2,6 +2,7 @@
     OverloadedStrings
   , UnicodeSyntax
   #-}
+-- |Internal functions for "Data.Time.RFC1123".
 module Data.Time.RFC1123.Internal
     ( rfc1123DateAndTime
     , toAsciiBuilder
@@ -10,11 +11,13 @@ module Data.Time.RFC1123.Internal
 import Data.Ascii (AsciiBuilder)
 import qualified Data.Ascii as A
 import Data.Attoparsec.Char8
+import Data.Convertible.Base
 import Data.Monoid.Unicode
+import Data.Tagged
 import Data.Time
 import Data.Time.Calendar.WeekDate
 import Data.Time.HTTP.Common
-import Data.Time.RFC822.Internal hiding (toAsciiBuilder)
+import Data.Time.RFC822
 
 -- |Parse an RFC 1123 date and time string.
 rfc1123DateAndTime ∷ Parser ZonedTime
@@ -31,7 +34,7 @@ dateTime = do weekDay ← optionMaybe $
                     → return ()
                 Just givenWD
                     → assertWeekDayIsGood givenWD gregDay
-              (tod, timeZone) ← rfc822time
+              (tod, timeZone) ← rfc822Time
               let lt = LocalTime gregDay tod
                   zt = ZonedTime lt timeZone
               return zt
@@ -68,4 +71,4 @@ toAsciiBuilder zonedTime
         ⊕ A.toAsciiBuilder ":"
         ⊕ show2 (floor (todSec timeOfDay) ∷ Int)
         ⊕ A.toAsciiBuilder " "
-        ⊕ showRFC822TimeZone timeZone
+        ⊕ untag (cs timeZone ∷ Tagged RFC822 AsciiBuilder)