-
Notifications
You must be signed in to change notification settings - Fork 269
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
Fix now(tz) #406
base: master
Are you sure you want to change the base?
Fix now(tz) #406
Conversation
It seems the current behavior is intentional, this PR breaks the tests. |
I think it might be a bit much to say it's intentional just because the tests actually check it :P The tests could have been black box tests and then they just set in stone what the current behavior is. |
Sure, but this PR does not adjust the tests. |
ae4a10a
to
36aa6e9
Compare
now(tz) should return the same time utcnow returns adjusted by whatever offset is contained by tz. Currently, the offset to freeze_time is also added, which is removed by this change The current unit test is wrong because the UTC time is 2:00:00, so GMT5 should be 7:00:00, not 3:00:00 Closes spulec#405
I fixed the unit test. There's still 2 broken but those appear to be broken on master. Explanation from commit message: The current unit test is wrong because the UTC time is 2:00:00, so GMT5 I'm not sure if there's more documentation, but I'm basing my understanding of
The first argument to |
@boxed @emontnemery does this look okay now that I fixed the test? |
now(tz) should return the same time utcnow returns adjusted by whatever
offset is contained by tz. Currently, the offset to freeze_time is also
added, which is removed by this change
Closes #405