You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the start time is at the day light saving ambiguous time, date_range raises errors even when the argument 'ambiguous' is set. It should not be raising error when the argument is set.
@aleisun Well spotted! Passing ambigious in lines 421 and 423 of pandas/pandas/core/arrays/datetimes.py seems to fix things. I'll take this and do a PR
I know that this is issue is closed. But the fact that this bug was reported with such precision, and was resolved swiftly, saved my work day, two years down the line, on a Friday.
Just wanted to remind that open source collaboration makes the world a better place in ways that we do not see day to day.
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
When the start time is at the day light saving ambiguous time, date_range raises errors even when the argument 'ambiguous' is set. It should not be raising error when the argument is set.
Issue could be due to the line
pandas/pandas/core/arrays/datetimes.py
Line 421 in 32ed15d
does not correctly pass the argument ambiguous to the function
tz_localize()
.Expected Output
No error
Output of
pd.show_versions()
AmbiguousTimeError: Cannot infer dst time from 2020-11-01 01:00:00, try using the 'ambiguous' argument
The text was updated successfully, but these errors were encountered: