-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
Inconsistency in tz_convert_single? #17734
Comments
yeah there is an embedded bug somewhere here, IOW we have both the multi convert and the single one. merits investigating. |
OK. One approach is to brute force over args to |
Trying to track this down, a couple other questions come up: The The last loop in |
Got a case where tz_convert disagrees with tz_convert_single. Unfortunately this is specific to tzlocal being US/Pacific (haven't found a great way to mock that yet).
Next up: figuring out what the answer is supposed to be in these cases. |
cc: @sinhrks looks like you worked on a related issue #7798 All existing uses of If not, then I need a hand finding a canonical answer for the disagreement case. |
Two things in
tslib
look slightly fishy, merit double-checking.https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/tslib.pyx#L3617
The piece that looks off is the use of
val
instead ofutc_date
. The analogous portion oftz_convert
reads:i.e. these appear inconsistent. Adding an assertion
assert utc_date == val
to the relevant case intz_convert_single
does not cause any test failures. Can someone confirm that this is correct as-is?_localize_tso
has a catch-all branch that looks like it should never be hit. If that is correct, then this can be simplified a decent amount.The text was updated successfully, but these errors were encountered: