Commit d3414b62 authored by Sheetal Umesh Kumar's avatar Sheetal Umesh Kumar Committed by GitHub

Merge pull request #39 from hypothesis/timezone-test-fix

Fix 'time' tests in timezones behind UTC
parents 275c882b e3a149ed
......@@ -44,6 +44,13 @@ describe('time', function () {
beforeEach(function () {
sandbox = sinon.sandbox.create();
sandbox.useFakeTimers();
// Ensure that the current local date is 01/01/1970, as this is assumed by
// test expectations
var offset = new Date().getTimezoneOffset();
if (offset > 0) {
sandbox.clock.tick(offset * 60 * 1000);
}
});
afterEach(function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment