-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
unix datetime tests fail if TZ != UTC #33
Comments
Fix welcome, but the simplest fix might be to run tests with If that's not an option, it shouldn't be hard to fix in python. |
To be honest, I don't know if that's a problem with the tests or with the underlying logic, i.e. if it doesn't break real code. |
I think (hope) it's just that tests assume UTC. |
Came here (late) to report the same (for Arch Linux). |
agreed, PR welcome to set the timezone for these tests. |
Since this library is used in tests, other people using this are likely to have the same problem in their own tests. So someone might write a test, not realize that it only passes in their (not necessarily UTC) timezone, and then it mysteriously fails for someone else. We probably can't do anything about that, but when a user realises that the probem is timezones, I think it's very likely that they'll try using |
In fact, now that I think of it, #48 seems like a perfect demonstration of this point. @samuelcolvin you intuitively expected |
Honestly I don't remember, I just know there are dragons herein, so I'm a bit unwilling to change things unless I'm sure it's an improvement. That being said, I'm sure it can be improved, so if you're confident this is an improvement, I'll look again. It would be good to add docs or content to the PR body that clearly explains the change for end users. |
OK, after seeing https://dirty-equals.helpmanual.io/latest/types/datetime/#timezones I agree about the dragons and I don't want to complicate things further. I've switched to the simpler fix. |
...and a few other things that got in my way as an initial contributor. Closes #33
The following tests fail if the system timezone is not UTC:
Full output:
The text was updated successfully, but these errors were encountered: