Skip to content
This repository has been archived by the owner on Aug 20, 2019. It is now read-only.

Mock out browser's current timezone #28

Open
samselikoff opened this issue Jun 17, 2016 · 2 comments
Open

Mock out browser's current timezone #28

samselikoff opened this issue Jun 17, 2016 · 2 comments

Comments

@samselikoff
Copy link

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

@samselikoff
Copy link
Author

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?

@jamesarosen
Copy link
Owner

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants