Why does new Date() and Date.parse treat ISO-8601 strings different?
I have this test date 2013-09-15T11:09:00 Depending on if I use Date.parse
and new Date the outcome will be different, but the UTC is same
Date.parse("2013-09-15T11:09:00")
Sun Sep 15 2013 11:09:00 GMT+0200 (W. Europe Daylight Time)
new Date("2013-09-15T11:09:00");
Sun Sep 15 2013 13:09:00 GMT+0200 (W. Europe Daylight Time)
If i add UTC both output same time and same UTC, a bug in Emacs standard? :D
new Date("2013-09-15T11:09:00+02:00");
Sun Sep 15 2013 11:09:00 GMT+0200 (W. Europe Daylight Time)
Date.parse("2013-09-15T11:09:00+02:00");
Sun Sep 15 2013 11:09:00 GMT+0200 (W. Europe Daylight Time)
No comments:
Post a Comment