#5175: UTCTime serialization not idempotent
---------------------------------+------------------------------------------
Reporter: warren | Owner:
Type: bug | Status: new
Priority: normal | Component: libraries (other)
Version: 7.0.3 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
decode . encode is not idempotent for UTCTime:
{{{
import Data.Time
import Data.Binary
test = do
t <- getCurrentTime
putStrLn $ "time: " ++ show t
let b = encode t
t' = decode b :: UTCTime
putStrLn $ " t': " ++ show t'
}}}
Running this code yields:
{{{
time: 2011-05-06 18:50:40.972389 UTC
t': 2011-05-06 00:00:00.001148625728 UTC
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5175>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs