missing Z on date conversion with default (iso I presume for .net 4.5 webapi

May 22, 2013 at 7:52 PM
Edited May 22, 2013 at 8:32 PM
When I pass a datetime through webapi and it is converted to json, I get a date downloaded without a Z at the end. That is, this is what comes down:

{"data":[{"MessageString":"First Line","DateTimeRightNow":"2013-05-22T12:44:58.6763211-07:00","DateTime1PmOctober5Th2013":"2013-10-05T06:00:00-07:00"},

What am I missing to not get the Z?


I'm now noticing (after testing more) that if I add:

[JsonProperty(ItemConverterType = typeof(JavaScriptDateTimeConverter))]
public DateTime LogDate { get; set; }

attribute to my DateTime that the conversion seems correct to JSON. should that not be the default?