System.Data.SQLite
View Ticket
Not logged in
Ticket UUID: 01f20ea55af386a4cb6dd2dbc0bd091cfed9dcf8
Title: DateTimeKind connect option with DataTable
Status: Closed Type: Incident
Severity: Important Priority: Medium
Subsystem: Data_Adapter Resolution: External_Bug
Last Modified: 2016-10-31 01:38:33
Version Found In: 1.0.103.0
User Comments:
anonymous added on 2016-10-10 17:57:26:
";datetimeformat=ISO8601;datetimekind=Utc;" in the connection string works GREAT to coerce the returned DateTime.Kind to UTC when reading the data from a  DataReader.  The KIND remains Unspecified when you fill a DataTable either with an DataAdapter or using the DataTable.Load(datareader) method.  Same data, same connection string, same everything else.

mistachkin added on 2016-10-10 20:59:00:
I've been able to reproduce the problem locally.

mistachkin added on 2016-10-10 21:16:25:
It appears this issue is caused by the .NET Framework DataColumn class.  It
has a DateTimeMode property that controls this behavior.

mistachkin added on 2016-10-10 21:41:21:
Confirmed.  System.Data.SQLite is working correctly.  The .NET Framework
defaults to Unspecified within their DataAdapter / DataTable / DataColumn
machinery.

Test case [/artifact?ci=tkt-01f20ea55a&filename=Tests/tkt-01f20ea55a.eagle].