View Ticket
Not logged in
Ticket UUID: f3ec1e006675e7fef45e57fa37d32bc5cb79396e
Title: Please set DateTime.Kind property when reading values
Status: Closed Type: Feature_Request
Severity: Minor Priority: High
Subsystem: Db_Type_Conversion Resolution: Fixed
Last Modified: 2011-12-21 09:31:15
Version Found In:
Using DateTimeFormat=Default on the connection string, DateTime values of UTC kind will be stored with 'Z' appended to properly mark it as UTC. Reading this value will however convert it according to current local timezone, not entire expected since we stored it as UTC. The DateTime.Kind property on the value is NOT set, causing the default value 'Unspecified' to be present.

As an example, '2011-12-15 09:48:53.4628806Z' will be read as '2011-12-15 10:48:53' for me (local timezone: +1) with property Kind=Unspecified. What I would like to see is Kind=Local, or Kind=UTC for that matter in case no time zone conversion was made.

Thank you.

mistachkin added on 2011-12-18 21:42:39 UTC:
Setting the DateTimeKind property of the connection string to Utc will do what you are asking for. For now, the default must remain Unspecified.

anonymous added on 2011-12-19 09:40:11 UTC:
Please consider adding a DateTimeKind property to SQLiteConnectionStringBuilder (hence why I missed it).

mistachkin added on 2011-12-19 20:00:28 UTC:
Ok, I'll do that.

mistachkin added on 2011-12-20 00:09:42 UTC:
Support added as of check-in [4fbdb092f8].

mistachkin added on 2011-12-20 04:39:35 UTC:
Please test these changes in your environment and let me know if they fix the issue for you.

anonymous added on 2011-12-21 09:31:15 UTC:
It's working great! Thanks!