git.iko.soy/typeable/postgresql-simple
on master help sign in
Fix ZonedTime printing
6e2ae08Leon P Smith
src/Database/PostgreSQL/Simple/Time/Internal/Printer.hs+1−1
@@ -102,7 +102,7 @@ timeZone = ((`quotRem` 60) . timeZoneMinutes) >$< (liftB tzh >*< tzm)
102
102
103 tzh = f >$< (char8 >*< digits2)
103 tzh = f >$< (char8 >*< digits2)
104
104
105− tzm = condB (==0) emptyB ((,) ':' >$< liftB (char8 >*< digits2))
105+ tzm = condB (==0) emptyB ((,) ':' . abs >$< liftB (char8 >*< digits2))
106
106
107utcTime :: BoundedPrim UTCTime
107utcTime :: BoundedPrim UTCTime
108utcTime = f >$< (day >*< liftB char8 >*< timeOfDay >*< liftB char8)
108utcTime = f >$< (day >*< liftB char8 >*< timeOfDay >*< liftB char8)
test/Time.hs−1
@@ -110,7 +110,6 @@ checkRoundTrips TestEnv{..} limit = do
110 assertBool "UTCTime did not round-trip from SQL to Haskell and back" $
110 assertBool "UTCTime did not round-trip from SQL to Haskell and back" $
111 res == [Only True]
111 res == [Only True]
112
112
113−
114 yxs :: [(ZonedTime, Int)] <- query conn [sql|
113 yxs :: [(ZonedTime, Int)] <- query conn [sql|
115 SELECT y, x FROM testtime WHERE y > ?
114 SELECT y, x FROM testtime WHERE y > ?
116 |] (Only limit)
115 |] (Only limit)