diff --git a/yfinance/base.py b/yfinance/base.py index 8e40831b8..0d42964e5 100644 --- a/yfinance/base.py +++ b/yfinance/base.py @@ -313,7 +313,7 @@ def history(self, period="1mo", interval="1d", else: # If a midnight is during DST transition hour when clocks roll back, # meaning clock hits midnight twice, then use the 2nd (ambiguous=True) - df.index = _pd.to_datetime(df.index.date).tz_localize(tz_exchange, ambiguous=True) + df.index = _pd.to_datetime(df.index.date).tz_localize(tz_exchange, ambiguous=True, nonexistent='shift_forward') df.index.name = "Date" # duplicates and missing rows cleanup