Hello,
my application reads timestamp values using DbCommand.ExecuteReader. The returned DateTime values have Kind = DateTimeKind.Local. Is this intent? IMHO, this is not quite correct, as there is no timezone information in the database columns. All other providers I can think of (SQLClient, Oracle data provider, Npgsql...) set Kind to Unspecified.
Thanks!
P.S.: I see in the release notes that this behavior was changed in the most recent version (350). But why?
Reading timestamp: DateTime.Kind = DateTimeKind.Local?
Re: Reading timestamp: DateTime.Kind = DateTimeKind.Local?
Are there any comments on this issue?
Changing this behavior in the provider is critical in my opinion. E.g. when the application code creates a DateTimeOffset from the read DateTime value, the DateTimeOffset value depends on the Kind of the DateTime value. Therefore, changing the behavior may break applications.
Thanks!
Changing this behavior in the provider is critical in my opinion. E.g. when the application code creates a DateTimeOffset from the read DateTime value, the DateTimeOffset value depends on the Kind of the DateTime value. Therefore, changing the behavior may break applications.
Thanks!
Re: Reading timestamp: DateTime.Kind = DateTimeKind.Local?
We have reproduced the issue when Devart.Data.PostgreSql.PgSqlDataReader.GetDateTime method returns DateTime with DateTimeKind.Local when reading from the timestamp without time zone column. We will correct this behaviour: DateTimeKind.Local -> DateTimeKind.Unspecified.
Re: Reading timestamp: DateTime.Kind = DateTimeKind.Local?
Pleased to hear that.
Regards,
Matthias
Regards,
Matthias
Re: Reading timestamp: DateTime.Kind = DateTimeKind.Local?
The bug with returning DateTime with DateTimeKind.Unspecified by PgSqlDataReader.GetDateTime method when reading from the timestamp without time zone column is fixed. We will post here when the corresponding build of dotConnect for PostgreSQL is available for download.
Re: Reading timestamp: DateTime.Kind = DateTimeKind.Local?
New build of dotConnect for PostgreSQL 6.0.17 is available for download!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=3&t=24292 .
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=3&t=24292 .