Permalink
Browse files

Including hdbc-postgresql timestamp handling fix.

  • Loading branch information...
1 parent 72042ff commit 90f663d99ee27ee085462ccd819f6414b141d051 @alsonkemp committed Jan 8, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 tmp/dependencies/hdbc-postgresql-1.1.4.1/Database/HDBC/PostgreSQL/Utils.hsc
@@ -68,7 +68,7 @@ withCStringArr0 :: [SqlValue] -> (Ptr CString -> IO a) -> IO a
withCStringArr0 inp action = withAnyArr0 convfunc freefunc inp action
where convfunc SqlNull = return nullPtr
convfunc (SqlEpochTime t) = do ct <- toCalendarTime $ TOD t 0
- newCString (formatCalendarTime defaultTimeLocale (iso8601DateFormat $ Just "%H:%M:%S") ct)
+ newCString ("TIMESTAMP WITH TIME ZONE '" ++ (formatCalendarTime defaultTimeLocale (iso8601DateFormat $ Just "%H:%M:%S %Z") ct) ++"'")
convfunc x = newCString (fromSql x)
freefunc x =
if x == nullPtr

0 comments on commit 90f663d

Please sign in to comment.