Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Miscellaneous Time Improvements

Sadly, it's not a fix either.  However,  AFAICT, there really isn't
any reason why a column in Postgres should not be declared as a
timestamp without time zone.  The behavior of such a column makes
absolutely no sense to me.
  • Loading branch information...
commit efd4c37340acee71a94bc91d4537343cc7317a4c 1 parent 7ebdb14
@lpsmith authored
2  Database/PostgreSQL/Simple/Param.hs
@@ -180,7 +180,7 @@ instance Param LT.Text where
{-# INLINE render #-}
instance Param UTCTime where
- render = Plain . Utf8.fromString . formatTime defaultTimeLocale "'%F %T'"
+ render = Plain . Utf8.fromString . formatTime defaultTimeLocale "'%F %T%Q+00'"
{-# INLINE render #-}
instance Param Day where
2  Database/PostgreSQL/Simple/Result.hs
@@ -172,7 +172,7 @@ instance Result UTCTime where
case parseTime defaultTimeLocale "%F %T%Q" (B8.unpack bs) of
Just t -> t
Nothing -> conversionFailed f "UTCTime" "could not parse"
- where ok = mkCompats [Timestamp]
+ where ok = mkCompats [TimestampWithZone]
instance Result Day where
convert f = flip (atto ok) f $ date
Please sign in to comment.
Something went wrong with that request. Please try again.