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

DST-related test failure. #726

Open
kevinmehall opened this issue May 4, 2015 · 0 comments
Open

DST-related test failure. #726

kevinmehall opened this issue May 4, 2015 · 0 comments

Comments

@kevinmehall
Copy link
Member

The following tests pass in Node. They pass in colony when the host time zone is PST, but not when it is PDT. The tests have been disabled in #725, and are preserved here for later analysis.

var d = new Date();
var offset = d.getTimezoneOffset() * 60000;
var offsetMinutes = (offset / 60000 % 60);
var offsetHours = (offset / 3600000 % 24);

d = new Date();
d.setHours(16);
d.setMinutes(0);
tap.eq(d.getUTCHours(), Math.floor(16 + offsetHours) % 24);

d = new Date();
d.setUTCHours(16);
d.setUTCMinutes(0);
tap.eq(d.getHours(), Math.floor(16 - offsetHours) % 24);
kevinmehall added a commit that referenced this issue May 4, 2015
These pass in Node, so this is a legitimate bug. Opens #726.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant