According to specifications, the ISO date string is parsed as UTC+0000, which is indicated by the Z
char at the end.
Z is the zone designator for the zero UTC offset
When you indicate a date time string for the Date()
constructor, it's parsed in UTC.
The method Date.prototype.toString()
is formatting the date according to your timezone, which may differ from UTC. Because of that you get this offset.
It's possible to indicate a custom timezone at the end of an ISO string with ±hh:mm
:
var d = new Date('2016-02-01T16:00:00+01:00');
d.toString() // will print "Feb 01 2016 16:00:00 GMT+0100", if you're in GMT+01:00