I think the difference is in how the value is evaluated.
new Date('05-20-2015').toString();
new Date('2015-05-20').toString();
As you can see, there is a difference of 5 hours between the setpoints
Date.parse ()
, , parse() . RFC2822/IETF (RFC2822, 3.3), . ", 25 1995 13:30:00 GMT". , , , ", 25 1995 13:30:00 +0430" (4 , 30 ). ISO, ES5, UTC. UTC . RFC2822 3.3 ( ES5 ISO 8601), .
2015-05-20 ISO8601, UTC.
, , new Date('2015-05-20 GMT-0500')