]> gitweb @ CieloNegro.org - time-http.git/blobdiff - Data/Time/RFC1123/Internal.hs
RFC822
[time-http.git] / Data / Time / RFC1123 / Internal.hs
index 4ae25b76b7c48d452c70367682da65112ee5ac27..9fd1e83247d55f556edc07e5fe001fbf48a0da2f 100644 (file)
@@ -11,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
@@ -32,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
@@ -69,4 +71,4 @@ toAsciiBuilder zonedTime
         ⊕ A.toAsciiBuilder ":"
         ⊕ show2 (floor (todSec timeOfDay) ∷ Int)
         ⊕ A.toAsciiBuilder " "
-        ⊕ showRFC822TimeZone timeZone
+        ⊕ untag (cs timeZone ∷ Tagged RFC822 AsciiBuilder)