You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Can you set logging to DEBUG and collect the logs?
Note that the problem seems to be on insert (i.e. PreparedStatement.setTime()); when I inspect the table contents at app.snowflake.com (the web interface), it's showing 11:34:56.
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: