Last post Sep 15, 2014 05:16 AM by Shawn - MSFT
Sep 10, 2014 02:12 AM|chanlo|LINK
Can anyone tell me how I can get DatetimeOffset to work in my DataContract class?
I tryed to add it to known types like this:
But i still get error on dates like: "2014-01-20T00:00:00+00:00" that i receive/send in json
Sep 15, 2014 05:16 AM|Shawn - MSFT|LINK
DateTimeOffset is one of the complex .NET types that is actually being handled as a primitive, except for that it is not registered by default as a KnownType to the serializers. So you need to do this manually.
public class Task
private DateTimeOffset CreationTime;
For more information, you could refer to: