When I use ASP.NET MVC 3 with the default Json serializer, I notice that dates from my JsonResults come back in the format /Date(-105998400000)/. To handle this, I extract the number and create a new Date object with this value. However, I am experiencing inconsistency between IE and Chrome.
var date = new Date(-105998400000);
You can check out my jsfiddle to see how different browsers display the results:
IE10 - Mon Aug 22 23:00:00 EST 1966
Firefox - Tue Aug 23 1966 00:00:00 GMT-0400 (US Eastern Standard Time)
Chrome - Tue Aug 23 1966 00:00:00 GMT-0400 (US Eastern Daylight Time)
Interestingly, two of my clients are seeing the August 22 date in Chrome.
I am puzzled by the fact that the same UTC milliseconds value returns different results in different browsers when creating a new Date object. Can you explain why this happens?