Converting JSON date string to a correct Date object
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4829569/help-parsing-iso-8601-date-in-javascript">Help parsing ISO 8601 date in Javascript</a>  </p>
</blockquote>



<p>I think this should be very simple but turned out amazingly tedious. </p>

<p>From WEB API, I received <code>selected</code> object via ajax, and one of its properties is InspectionDate datetime string such as <code>2012-05-14T00:00:00</code></p>

<p>In javascript, I use following code to have correct date object</p>

<pre><code>selected.JsInspectionDate = new Date(selected.InspectionDate);
</code></pre>

<p>But JsInspectionDate shows </p>

<pre><code>2012/05/14 00:00 in firefox, 
2012/05/13 20:00 in chrome and 
NAN in IE9
</code></pre>

<p>for <code>2012-05-14T00:00:00.</code></p>

<p>Could someone tell me why this problem occurs? And how to fix this issue? I just want to show as in firefox for all browsers.</p>
