Direct=true with TIMESTAMP WITH TIMEZONE timezone offset bug

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
mas
Posts: 25
Joined: Mon 15 Nov 2010 12:09

Direct=true with TIMESTAMP WITH TIMEZONE timezone offset bug

Post by mas » Wed 05 Jan 2011 12:38

I have a table, MyTable, with a column, Timestamp, of type TIMESTAMP WITH TIMEZONE. The entity model generated from this assigns the DateTime type to the Timestamp property of MyTable. Unfortunately, the DateTime has no timezone offset information contained in it (as opposed to DateTimeOffset).

I have noticed different behaviour between Direct=True vs Direct=False.

I insert a MyTable entity with Timestamp set as follows, my timezone is GMT+1:

Code: Select all

myTable.Timestamp = DateTime.Now;
I get the following value for Timestamp in the database:
  • Direct=true (Direct mode): 05.01.11 13:19:40,732423 +00:00
    Direct=false (Oracle client mode): 05.01.11 13:19:49,663316 +01:00
It seems that in Direct mode, the DateTime is assumed to be UTC time. The Oracle Client seems to take the system's offset and assume that the DateTime is local time.

In Direct mode, shouldn't the DateTime assumed to be local time, like how the Oracle client handles it, or is this expected behaviour?

This causes problems for us because the data in the TIMESTAMP WITH TIMEZONE columns are different depending on whether Direct mode is true or false. The data should be the same no matter what mode I am using.

I am using Devart dotConnect for Oracle Professional 6.0.58.0.

mas
Posts: 25
Joined: Mon 15 Nov 2010 12:09

Post by mas » Mon 10 Jan 2011 09:05

Is there anyone looking into this? Does anyone understand the problem I am having? Is this a bug or expected behaviour? If needed, I can come up with a sample project to demo this.

In our project, we would like to deploy with Direct=true, since it saves us the hassle of installing the Oracle client. However, if this is expected behaviour, then we can change our code to match the behaviour we need.

If this is a bug, then I guess we will have to wait for a fix. For now, I think we are stuck using the Oracle client.

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 10 Jan 2011 15:00

We have reproduced this behaviour and are investigating the issue now. I will notify you about the results as soon as possible. Sorry for the delay.

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 13 Jan 2011 11:22

We have fixed the problem with timezone in the Direct mode. I will post here when the corresponding build is available for download.

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 27 Jan 2011 16:29

New version of dotConnect for Oracle 6.10 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only): http://secure.devart.com/ .
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=20115 .

Post Reply