I'm trying to convert string into epoch time in milliseconds using specs found on:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
For some reason the following snippet of codes returns March 13 instead of Feb 24, 2014.
Snippet 1:
alert(Date(Date.parse("2014-02-24T09:49:22.000-0800")));
Output: Thu Mar 13 2014 21:51:41 GMT-0700 (Pacific Daylight Time)
Snippet 2:
alert(Date(Date.parse("2014-02-24")));
Output: Thu Mar 13 2014 21:51:41 GMT-0700 (Pacific Daylight Time)
Is this some sort of timezone issue or what is the mistake that i have done ?