Reputation: 41
With EF Core 2.2.6 I am saving DateTime
--> Oracle Timestamp(7)
with Time zone : 30.07.19 18:13:23,283000000 +02:00
. But when I am reading it back its : 30.07.19 20:13:23,283000000 +02:00
.
How can I exlpicitly mention in EF core no DateTime
convertions?
Upvotes: 4
Views: 2763
Reputation: 41
Solved the issue. Changed the driver from Devart to Oracle.EntityFrameworkCore 2.19.30
1) Devart driver got some issues with Timezone offset. reading with timstamp + offset and writing to DB with out offset.
2) Oracle.EntityFrameworkCore 2.19.30 released a week back is the perfect solution for me. It solved 1) Timezone issue and 2) performance issue (10X faster). 3) some other small issues in my web application.
Thank you.
Upvotes: 0
Reputation: 9804
Dealing with DateTimes and Timezones is between complicated and able to drive you mad. However I have 3 rules that make working with them manageable:
However there are some scenarios (like a Calendar) where you have to deal with timezones instead.
Also note that 0.07.19 18:13:23,283000000 +02:00
is not actually the value. This is a String Representation of the value, using the users settings for details like formating and timezone.
Upvotes: 3