Skip to Main Content

ODP.NET

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!

Using TimeStamp with TimeZone in Entity Framework

923224Mar 12 2012 — edited Mar 23 2012
Hi,
I have a table with a column defined as TIMESTAMP(6) WITH TIME ZONE
My Entity Framework entity was correctly defined in the designer as DateTimeOffset.
I need the Time Zone for the scenario of having a central server that writes to the DB and multiple users of different counties (that pass their DateTimeOffset) and I would like to both write the correct time (for all countries) and provide support using the local time of the user.
For example: if user X in England at 9 am had a problem I would like to contact him about 9am (and not my current time).

But when I use DateTimeOffset with an offset for another country the Time zone is switched back to my country (the time is the correct time).
Trying to debug the code I got to this line:
new OracleParameter(name, (object) ((DateTimeOffset) value).DateTime))
Where ODP.net is converting the value I pass to DateTime and later it is converted to the default DateTimeOffset (of my local computer).

Is there something I can do?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2012
Added on Mar 12 2012
4 comments
3,803 views