oysteinkrog/SQLite.Net-PCL — pull request #51 by jamesottaway (2014-08-05 03:40:33+00:00)
Title: Handle the DateTimeKind of a DateTime column

All `DateTime` properties coming back from SQLite.Net-PCL had a `DateTimeKind` of `Unspecified` which isn't ideal.

The simplest solution was to convert all `DateTime` objects to UTC using the `ToUniversalTime()` method, before serialising them into SQLite, with an explicit 'Z' suffix when `StoreDateTimeAsTicks` is disabled and we use have to call `ToString()`.

This means that we must pass an explicit `DateTimeKind` of `Utc` to the `new DateTime` call on `SQLiteCommand#L435` for when `StoreDateTimeAsTicks` is enabled. The `DateTime.Parse` on `SQLiteCommand#L437` will start returning a `DateTime` with the correct `DateTimeKind` since we added the 'Z' suffix to the value we store on `SQLiteCommand#L325`.

Any questions?