Oracle TimeStamp with local timezone

Posts   
 
    
bjorninn
User
Posts: 3
Joined: 05-Apr-2007
# Posted on: 27-Jul-2007 05:30:52   

Is there any way of using the Oracle datatype “TimeStamp with local timezone” without writing a custom type converter? We are using ODP.net (Oracle.DataAccess, Version=2.102.2.20) and Oracle 10gR2.

Thanks.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 27-Jul-2007 10:48:34   

Isn't this a setting in the database. Timestamps are mapped into .NET DateTime dataType. And as far as I know timezones are stored in the metadata of the database, so it would automatically convert any passed dateTime into the specified timezone.

Based on the above I don't think you will need a TypeConverter.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 27-Jul-2007 10:53:15   

ODP.NET maps it to a DateTime struct, so we return the value as a DateTime struct. Into which type do you want to convert it into?

Frans Bouma | Lead developer LLBLGen Pro
bjorninn
User
Posts: 3
Joined: 05-Apr-2007
# Posted on: 01-Aug-2007 05:39:13   

Thanks! We did not need a typeConverter. Corrupted data resulted in strange errors. Timestamp with local timezone works like a charm.