git.iko.soy/typeable/postgresql-simple
on master help sign in
Fix ZonedTime printing
commit6e2ae08345a75ec80eed37c94107d17f6248a0f9 authorLeon P Smith <leon@melding-monads.com> dateMon 21 Sep 2015, 20:49 (11 years ago) parent70b92d2
2 files changed+1−2
src/Database/PostgreSQL/Simple/Time/Internal/Printer.hs+1−1 test/Time.hs−1
src/Database/PostgreSQL/Simple/Time/Internal/Printer.hs+1−1
@@ -102,7 +102,7 @@ timeZone = ((`quotRem` 60) . timeZoneMinutes) >$< (liftB tzh >*< tzm)
102102
103103 tzh = f >$< (char8 >*< digits2)
104104
105− tzm = condB (==0) emptyB ((,) ':' >$< liftB (char8 >*< digits2))
105+ tzm = condB (==0) emptyB ((,) ':' . abs >$< liftB (char8 >*< digits2))
106106
107107utcTime :: BoundedPrim UTCTime
108108utcTime = f >$< (day >*< liftB char8 >*< timeOfDay >*< liftB char8)
test/Time.hs−1
@@ -110,7 +110,6 @@ checkRoundTrips TestEnv{..} limit = do
110110 assertBool "UTCTime did not round-trip from SQL to Haskell and back" $
111111 res == [Only True]
112112
113−
114113 yxs :: [(ZonedTime, Int)] <- query conn [sql|
115114 SELECT y, x FROM testtime WHERE y > ?
116115 |] (Only limit)