Reputation: 28386
To which Java data types can (or should) my application map Oracle column types TIMESTAMP WITH TIME ZONE
or TIMESTAMP WITH LOCAL TIME ZONE
? Can the Oracle JDBC driver map these types to either Date
or Calendar
objects? Does Calendar
preserve the time zone value whereas Date
does not?
Upvotes: 5
Views: 2566
Reputation: 28386
The JDBC 4.0 Specification does not even mention time zones, so JDBC does not specify how a JDBC driver should handle SQL type TIMEZONE WITH TIME ZONE
or how to interpret the time zone that may appear in a TIMESTAMP
literal value. So, the JDBC specification leaves time zone interpretation entirely up to the JDBC driver implementation!
Upvotes: 3