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

Test failure with daylight saving times #2

Closed
gracinet opened this issue May 13, 2017 · 3 comments
Closed

Test failure with daylight saving times #2

gracinet opened this issue May 13, 2017 · 3 comments

Comments

@gracinet
Copy link

Hi,

I noticed the following test failure under Python 3.5:

======================================================================
FAIL: test_utc (tests.test_context_mgr.TestScaledContext)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/testenv/hiro/tests/test_context_mgr.py", line 41, in test_utc
    math.ceil((start_local - start_utc).seconds / 60.0 / 60.0))
AssertionError: 1 != 2

If I understand correctly, the test checks that the Timeline context manager does not introduce inconsistent timezone offsets.

My current timezone is Europe / Paris, and therefore changes from CET to CEST in spring.
I tried forcing the timezone to UTC, or af fixed offset, like UTC+0300, and the test passes.

That's why I think it's related to daylight saving time, and it may not be a false positive.

@alisaifee
Copy link
Owner

Thanks @gracinet - I'm able to reproduce this locally.

alisaifee added a commit that referenced this issue May 16, 2017
@alisaifee
Copy link
Owner

The problem was an incorrect use of time.gmtime to get utc.

@alisaifee
Copy link
Owner

Fix is in 0.3

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