Skip to content
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

TST: Add test for pd.Timestamp DST transition #60346

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions pandas/tests/scalar/timestamp/test_arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,17 @@ def test_timestamp_add_timedelta_push_over_dst_boundary(self, tz):

assert result == expected

def test_timestamp_dst_transition(self):
# GH 60084
dt_str = "2023-11-05 01:00-08:00"
tz_str = "America/Los_Angeles"

ts1 = Timestamp(dt_str, tz=tz_str)
ts2 = ts1 + Timedelta(hours=0)

assert ts1 == ts2
assert hash(ts1) == hash(ts2)


class SubDatetime(datetime):
pass
Expand Down