I would like to share what I found using JavaScript today.
Simple example here
d1 = "2014-07-15T14:00:00.000Z"
d2 = "2014-07-15T14:00:00.000Z"
ISO input lines are formatted with new Date().toISOString();. I got the first date from the server, where it was saved in mongoDB as ISOString, and the second was created manually.
If I do new Date(d1);, it returns "Invalid date", but if I do the same for d2, it will return the correct date.
source
share