java.sql.SQLException When Accessing Timestamp With Local Time Zone in JDBC 10.1.0.3

(Doc ID 821762.1)

Last updated on OCTOBER 05, 2010

Applies to:

JDBC - Version: 10.1.0.2 to 10.2.0.4 - Release: 10.1 to 10.2
Information in this document applies to any platform.

Symptoms

When retrieving a column for timestamp with local timezone, the JDBC driver 10.1.0.5 throws a SQLException error:
java.sql.SQLException
at oracle.sql.TIMEZONETAB.getOffset(TIMEZONETAB.java:346)
at oracle.jdbc.driver.TimestampltzAccessor.TimeZoneAdjust(TimestampltzAccessor.java:426)
at oracle.jdbc.driver.TimestampltzAccessor.getTimestamp(TimestampltzAccessor.java:315)
at oracle.jdbc.driver.OracleResultSetImpl.getTimestamp(OracleResultSetImpl.java:724)


For example:
On the server the timestamp is 1600-1-1 1:1:1:1000000 adjusted for local timezone (-04:00) the value becomes 1599-12-31 19:50:01:001.

Certain timestamp with local time zone values cannot be accessed from a result set. When trying to access a timestamp with local time zone value where the time zone offset causes a change in the year, a SQL exception is thrown by the driver.




Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms