jamesarosen/Timecop.js

Mock out browser's current timezone

Opened this issue · 2 comments

Anyone here have experience with mocking out the browser's Timezone API? Timecop.travel works great but we have failing tests on our CI server because of the server's timezone

The Timeshift.js library has a simple function that mocks this out:

TimeShift.Date.prototype.getTimezoneOffset = function() { return timezoneOffset; }

@jamesarosen would you be open to a PR that adds this to Timecop.js?

This repo is deprecated and no longer maintained. I thought I put that in the README, but apparently not. I've been using Sinon's date-stubbing, which works well and is well-maintained.