-
Notifications
You must be signed in to change notification settings - Fork 45
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 value test failures with Node.js version 8.9.1 #475
Comments
Maybe a time zone issue of some kind -- given that both are 7 hours off. |
These failures are due to a change in how dates are handled in Node.js in version 8 (on account of the underlying ES2015 spec). See here for details: When the following is eval'ed via the Node.js Client API:
the MarkLogic server returns a date without a time zone:
The ES2015 spec says:
Thus the following line in the API code: https://github.com/marklogic/node-client-api/blob/master/lib/server-exec.js#L85 yields the following value, which is shifted based on the local time zone:
This new behavior breaks the two tests, which compare that value with the following that uses a value (with a timezone):
A fix is to eval and test against the following, which avoids the time zone-related mismatch:
|
Addresses change in date handling in Node.js version 8. Fixes marklogic#475
Addresses change in date handling in Node.js version 8. Fixes #475
Good sleuthing. |
Addresses change in date handling in Node.js version 8. Fixes marklogic#475
Addresses change in date handling in Node.js version 8. Fixes #475
@ayuwono, FYI, in looking ahead to supporting Node.js versions 8 and beyond, you may have to adjust tests that eval dates on the server (and possibly other date tests). |
Merged after passing test-basic locally and on Jenkins. |
Upgrading to Node.js version 8.9.1 and running test-basic on the develop branch yields the following two failures (these failures do not occur with Node.js version 6.9.0):
The text was updated successfully, but these errors were encountered: