To_Char and timezone offsets
595071May 26 2008 — edited May 29 2008I am using Oracle 10.2.0.3 and ODP.Net 2.10. I am running into an issue where I have inserted data in a TimeStampTimeZone column in the database using a .Net dataset. (Adapter and InsertCommand). The timezone offset being inserted is -05:00
I query the database using sql*plus and see the right value in the database. The timezone offset is also correct.
I retrieve the value from the database using ODP.Net and a SQL query as follows
Select to_char(mydatetime) from test
The datetime that I get back has the timezone offset of my current database session i.e -04:00. I expect to get back what I stored i.e -05:00. Just wondering is anybody has seen this issue or it is a possible bug in my code.