]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/RFC1123DateTime.hs
Slight speed improvement and bugfix
[Lucu.git] / Network / HTTP / Lucu / RFC1123DateTime.hs
index 9962c16924a935aa1e28e57bc7d72dd8f310b880..4d7aa1576a1acf308b99c9e6ae4e36b3520f2a8e 100644 (file)
@@ -37,7 +37,7 @@ formatRFC1123DateTime time
       fmtDec 2 (ctMin    time)
       ++ ":"  ++
       fmtDec 2 (ctSec    time)
-      ++ ":"  ++
+      ++ " "  ++
       id       (ctTZName time)
       
 
@@ -70,12 +70,12 @@ parseHTTPDateTime src
 
 
 httpDateTime :: Parser ClockTime
-httpDateTime = do foldl (<|>) (fail "") (map string week)
+httpDateTime = do foldl (<|>) failP (map string week)
                   char ','
                   char ' '
                   day  <- liftM read (count 2 digit)
                   char ' '
-                  mon  <- foldl (<|>) (fail "") (map tryEqToFst (zip month [1..]))
+                  mon  <- foldl (<|>) failP (map tryEqToFst (zip month [1..]))
                   char ' '
                   year <- liftM read (count 4 digit)
                   char ' '