Ensure 3 digits in milliseconds of ISO-date


This is proberbly a bug in IE 9, but dates in the format of
2012-07-27T17:13:56.44+02:00 will parse to NaN
2012-07-27T17:13:56.440+02:00 however works fine
Closed Feb 2, 2013 at 2:02 AM by JamesNK
The next version of Json.NET will have DateFormatString on JsonSerializerSettings. Set it to @"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK" and you will always get 3 millisecond digits.


scda0001 wrote Aug 17, 2012 at 3:42 PM

Same problem here. Any workaround for this?


wrote Sep 30, 2012 at 11:06 PM

wrote Oct 2, 2012 at 11:55 AM

wrote Oct 15, 2012 at 1:59 PM

Damiano wrote Oct 15, 2012 at 2:02 PM

Please ensure 3 digit if milliseconds are provided

wrote Jan 8, 2013 at 12:22 AM

simone_b wrote Jan 8, 2013 at 12:24 AM

This is indeed a problem with JSON.NET. At times a DateTime value is serialized with milliseconds chopped to two digits rather than three, which is easy to spot if on the client side you are using IE (tried with IE9) and do new Date(your JSON.NET serialized date string). The workarounds are straightforward, but this is a bug.

wrote Jan 17, 2013 at 10:48 PM

wrote Jan 20, 2013 at 9:14 PM

wrote Feb 2, 2013 at 2:02 AM

wrote Feb 22, 2013 at 2:48 AM

wrote May 16, 2013 at 1:37 PM