Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date parse behavior change in node-v8 ? #13210

Closed
c0b opened this issue May 25, 2017 · 2 comments
Closed

Date parse behavior change in node-v8 ? #13210

c0b opened this issue May 25, 2017 · 2 comments
Labels
notable-change PRs with changes that should be highlighted in changelogs. question Issues that look for answers. v8 engine Issues and PRs related to the V8 dependency.

Comments

@c0b
Copy link
Contributor

c0b commented May 25, 2017

this is the latest v8 nightly: it parses as a local timestamp:

➸ ./opt/node-v8.0.0-nightly20170524260cd411d4-linux-x64/bin/node -p 'new Date("2017-05-24T00:00:00")'
2017-05-24T07:00:00.000Z

vs. v7 and v6 below parse the same string always as UTC

➸ ./opt/node-v7.10.0-linux-x64/bin/node -p 'new Date("2017-05-24T00:00:00")'
2017-05-24T00:00:00.000Z
@mscdex
Copy link
Contributor

mscdex commented May 25, 2017

This could be why the ftp test has been failing in citgm for master. According to at least the ECMAScript 2018 spec this behavior is correct (I'm not sure if/when it changed though):

When the time zone offset is absent, date-only forms are interpreted as a UTC time and date-time forms are interpreted as a local time.

EDIT: It looks like this behavior may have changed in ES2015

@mscdex mscdex added question Issues that look for answers. v8 engine Issues and PRs related to the V8 dependency. labels May 25, 2017
@bnoordhuis
Copy link
Member

EDIT: It looks like this behavior may have changed in ES2015

Yes, that's correct. I'll close this out as working per spec but it's something we probably want to call out in the release notes.

@gibfahn gibfahn added the notable-change PRs with changes that should be highlighted in changelogs. label May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notable-change PRs with changes that should be highlighted in changelogs. question Issues that look for answers. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

4 participants