incorrect timezone handling for java.sql.Time #2020
Labels
question
Issue is a usage/other question rather than a bug
status-information_needed
Additional information is required from the reporter
status-triage
Issue is under initial triage
What version of JDBC driver are you using?
3.21.0
What operating system and processor architecture are you using?
MacOS 15.2, Apple Silicon (ARM)
What version of Java are you using?
openjdk 21.0.5 (temurin)
What did you do?
Create a table with a TIME column, insert a row with value 12:34:56. My local timezone is UTC+1, snowflake is in UTC.
See: https://github.com/peterhalicky/snowflake-jdbc-time-bug
I expect that when I query the row and use ResultSet.getTime on the column, I get the same value. But instead I got 11:34:56. I suspect this is a problem in the JDBC driver, since snowflake as such doesn't really carry timezone in the TIME column. I would expect that PreparedStatement.setTime() and ResultSet.getTime() are consistent when converting to/from java.sql.Time.
Attached.
snowflake_jdbc0.log
The text was updated successfully, but these errors were encountered: