Wrong timezone for java.sql.Date, java.sql.Time and java.sql.Timestamp objects returned by with-query-results


  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:


Our database stores date and time related information in UTC. But, the results from with-query-results creates objects in the local timezone. This is causing a lot of unexpected behavior when constructing Joda DateTime objects in clj-time. Currently, the with-query-results function is using the single argument getter functions in the ResultSet

getDate(int columnIndex)
getTime(int columnIndex)
getTimestamp(int columnIndex)

We can solve this problem if we can optionally pass the timezone information and call the two argument getter functions.

getDate(int columnIndex, Calendar cal)
getTime(int columnIndex, Calendar cal)
getTimestamp(int columnIndex, Calendar cal)


Jestine Paul made changes -
Field Original Value New Value
Attachment resultset-timezone.diff [ 11394 ]
Sean Corfield made changes -
Status Open [ 1 ] Resolved [ 5 ]
Resolution Declined [ 2 ]
Sean Corfield made changes -
Status Resolved [ 5 ] Closed [ 6 ]


Vote (0)
Watch (0)


  • Created: