Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDBC and Timezones in Oracle9i

139298Mar 17 2004 — edited Mar 24 2004
Hi all,

I'm noticing that when I use the JDBC Thin driver to connect to an Oracle9i instance, the session timezone is set to GMT (+00:00) despite the fact that the database and the client are both running in CST (-06:00). This means that when I get the current time (e.g. select current_timestamp from dual) the time is always returned in GMT rather than the expected CST.

Furthermore, if I connect using sqlplus or the OCI JDBC driver, the session timezone is correct (-06:00), and the query to return the current time is also correct...given in CST rather than GMT.

Has anyone seen this kind of behavior? Is it a known bug in the 9i thin driver? Any suggestions for workarounds other than having to set the session manually in my application or require full oracle client installation so I can use the OCI driver?

BTW, I'm running Oracle 9.2.0.1.0. I've tested clients running under 1.3 and 1.4 under windows and Linux, and I've tested against databases running under windows and linux - all environments present the same behavior.

Thanks,
John
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 21 2004
Added on Mar 17 2004
8 comments
1,427 views