Is it possible to specify an offset for JSON.NET deserialization of DateTimeOffset?
问题 The following statement prints "1/1/0001 4:00:00 PM -05:00" Console.WriteLine(JsonConvert.DeserializeObject<DateTimeOffset>("\"0001-01-01T16:00:00\"")); This is because when json.net deserializes a DateTime string (which doesn't have an offset) to a DateTimeOffset object, it assigns the local offset, which in this case is -05:00. What if I don't want to use the local offset? Is there any way I can specify an offset to use for this deserialization? (The use case is the database server and the