Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Fix tz toUTC
intest_time
test#133109
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
It looks to me that the purpose of the test is to run on non-UTC timezone. It does not make sense to run it on UTC. |
It is buggy on most timezones. Seehttps://buildbot.python.org/#/builders/1678/builds/17 as an example (uses IST). It is not an inherently non-UTC test, I can freeze it to something else if there is another one guaranteed to work. |
Shouldn't we solve this by making the test actually test that the desired behavior applies across all zones? |
Solving this forall time zones is unlikely. As you said earlier:
I was looking into this over the last few days and was unable to find a nice solution either. |
This test was added in 2012 and was not changed since. If it fails, there is something wrong either with our code, or with platform. Please open an issue and provide as much details as possible. What platform, on what timezone the test fails. |
The issue (by Paul) has been open for a while#83985 |
I think that this issue only comes up in zones with negative DST, and it's hitting into a real bug. Fixing the test to UTC makes it seem like this test — which doesn't really do much in UTC, mind you — is not intended to work in other zones, which is the opposite of the truth. This is the kind of thing that we would usexfail for if we were able to use
If we have a good way to parameterize over locale and to run these things with fixed times (a la freezegun), then I think option 3 is way better than option 2. It's a bit of a problem that this test will only fail during part of the year if run in a specific locale. Even if we fix the bug, ideally we'd have tests that always succeed or fail no matter what locale the test suite is run in. (I realize I should probably know if we have a way to freeze time or parameterize over locales, but as you may have noticed by the delay in my responses to most things, my free time is extremely limited these days and it's been a while since I looked into the finer points of what's available in our test supports). |
Currently on DST, this causes: