Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
parseZone() not parsing UTC correctly #3463
On latest version (2.15.1), parseZone() seems not working correctly when offset is utc.
The method was good on 2.14.1, I recently updated moment.js to 2.15.1 and the new version failed my test case.
referenced this issue
Oct 12, 2016
Is this maybe related? I tested with with 2.15.1 too:
t = moment().toISOString(); console.log(t.toString()); parsed = moment.parseZone(t); console.log(parsed.toISOString());
My local time is "Europe/Vienna" and thus I know where the 2 hour difference probably comes from but I don't see why it should do it.
With 2.14.1 I get the expected output: