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
returns Timestamp('2023-03-26 07:00:00+0200', tz='Europe/Paris'), which is wrong
pd.Timestamp(d) + timedelta(days=1) also gives the wrong result.
Issue Description
One day after the initial timestamp, the hour count should not have changed. Even if that day has only 23 hours because of DST.
Apparently, Timestamp does not alter the timezone because pd.Timestamp(d).tz == d.tzinfo, yet it changes its behavior.
Expected Behavior
Using the same example, d + pd.Timedelta(days=1) or d + timedelta(days=1) returns the correct result : datetime.datetime(2023, 3, 26, 6, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Paris')))
Uh oh!
There was an error while loading. Please reload this page.
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
returns
Timestamp('2023-03-26 07:00:00+0200', tz='Europe/Paris')
, which is wrongpd.Timestamp(d) + timedelta(days=1)
also gives the wrong result.Issue Description
One day after the initial timestamp, the hour count should not have changed. Even if that day has only 23 hours because of DST.
Apparently,
Timestamp
does not alter the timezone becausepd.Timestamp(d).tz == d.tzinfo
, yet it changes its behavior.Expected Behavior
Using the same example,
d + pd.Timedelta(days=1)
ord + timedelta(days=1)
returns the correct result :datetime.datetime(2023, 3, 26, 6, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Paris')))
Installed Versions
The text was updated successfully, but these errors were encountered: