Unable to map .NET DateTimeOffset to Oracle timestamp with time zone column

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Eric_08
Posts: 19
Joined: Wed 11 Jul 2018 21:50

Unable to map .NET DateTimeOffset to Oracle timestamp with time zone column

Post by Eric_08 » Thu 12 Jul 2018 13:45

I'm getting the following error when I have DateTimeOffset column that maps to Oracle timestamp with time zone column.

ArgumentOutOfRangeException: Offset must be within plus or minus 14 hours. Parameter name: offset

Error occurs while trying to materialize the result.

Error occurs in Direct mode only! In non-direct mode, everything works just fine, but when I switch to direct mode, I get the exception on the same code that worked before.

Some information

Oracle server: 12.1
DevArt component v9.6.540
.NET Core 2.1
EF Core 2.1.1

Eric_08
Posts: 19
Joined: Wed 11 Jul 2018 21:50

Re: Unable to map .NET DateTimeOffset to Oracle timestamp with time zone column

Post by Eric_08 » Sat 14 Jul 2018 16:11

This is blocking our application to run on Linux since only Direct mode is available on Linux. DevArt, please fix this issue as soon as possible. In OCI mode, I can materialize DateTimeOffset just fine, but in direct mode, it fails to materialize DateTimeOffset when column is mapped to timestamp with time zone column.

Oracle server: 12.1
DevArt component v9.6.540
.NET Core 2.1
EF Core 2.1.1

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

Re: Unable to map .NET DateTimeOffset to Oracle timestamp with time zone column

Post by Shalex » Mon 16 Jul 2018 14:04

The bug with using the OracleDbType.TimeStampTZ parameter when working with Oracle 12.1 in the Direct mode is fixed in v9.6.540. Make sure that this is your current version.

If this doesn't help, upload a simple test project with the corresponding DDL/DML script for reproducing to ftp://ftp.devart.com (credentials: anonymous / yourEmail)

Eric_08
Posts: 19
Joined: Wed 11 Jul 2018 21:50

Re: Unable to map .NET DateTimeOffset to Oracle timestamp with time zone column

Post by Eric_08 » Mon 16 Jul 2018 16:42

I just uploaded sample project (TestOracleProject.zip).

Thanks.

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

Re: Unable to map .NET DateTimeOffset to Oracle timestamp with time zone column

Post by Shalex » Wed 18 Jul 2018 05:50

Thank you for your test project. We will notify you when the issue is fixed.

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

Re: Unable to map .NET DateTimeOffset to Oracle timestamp with time zone column

Post by Shalex » Fri 20 Jul 2018 07:48

The bug with retrieving TIMESTAMP WITH TIMEZONE values with negative timezone in the Direct mode is fixed: viewtopic.php?f=1&t=37474.

Post Reply