I am using JSON.net for Compact Framework - version 3.5r8. The referenced file is: Newtonsoft.Json.Compact.dll.
If I have a JSON object with a date/time in ISO 8601 format, such as:
{
"name": "TestObject",
"timestamp": "2017-08-04T13:39:16+01:00"
}
And I de-serialize this using JsonConvert.DeserializeObject<TestObject>(response), C# parses the timestamp property to a DateTime as expected, however the time is parsed at 05:39AM so there is clearly a time zone issue in play causing the parsing to be out by 8 hours from UTC.
I appreciate the "full" / latest versions of JSON.net do have options we can pass by way of JsonSerializerSettings to alter the date time zone handling but none of these seem to be available with JSON.net Compact.
How can I cause the time stamp to be parsed in UTC as expected?