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

Make time tests time-zone-independent #29

Open
jeremyruppel opened this issue Jul 10, 2012 · 3 comments
Open

Make time tests time-zone-independent #29

jeremyruppel opened this issue Jul 10, 2012 · 3 comments

Comments

@jeremyruppel
Copy link
Owner

@kagd added a test for 0600 in #28, but it would be great if we didn't have to deal with that BS.

@kagd
Copy link
Contributor

kagd commented Jul 13, 2012

We can probably just convert the time that is being passed to UTC time since that will remain constant.

@jeremyruppel
Copy link
Owner Author

The tricky part with this one is that we typically don't want to display UTC to the user; it'll more likely be in their local time zone. So, what would be nice is to always have the test suite run in a specific time zone (doesn't matter which one).

I was thinking something like https://github.com/vesln/timekeeper might be of use here. Freeze time in a certain zone before the time-dependent tests.

@kagd
Copy link
Contributor

kagd commented Jul 13, 2012

Good point. I will try that out and see if I can get something working.

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

No branches or pull requests

2 participants