Skip to content

Commit

Permalink
Fix ZonedTime printing
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsmith committed Sep 22, 2015
1 parent 70b92d2 commit 6e2ae08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/Database/PostgreSQL/Simple/Time/Internal/Printer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ timeZone = ((`quotRem` 60) . timeZoneMinutes) >$< (liftB tzh >*< tzm)

tzh = f >$< (char8 >*< digits2)

tzm = condB (==0) emptyB ((,) ':' >$< liftB (char8 >*< digits2))
tzm = condB (==0) emptyB ((,) ':' . abs >$< liftB (char8 >*< digits2))

utcTime :: BoundedPrim UTCTime
utcTime = f >$< (day >*< liftB char8 >*< timeOfDay >*< liftB char8)
Expand Down
1 change: 0 additions & 1 deletion test/Time.hs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ checkRoundTrips TestEnv{..} limit = do
assertBool "UTCTime did not round-trip from SQL to Haskell and back" $
res == [Only True]


yxs :: [(ZonedTime, Int)] <- query conn [sql|
SELECT y, x FROM testtime WHERE y > ?
|] (Only limit)
Expand Down

0 comments on commit 6e2ae08

Please sign in to comment.