Skip to content

Commit

Permalink
TST: Add test for pd.Timestamp DST transition (#60346)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevsterAmp authored Nov 17, 2024
1 parent e7d1964 commit 7fe270c
Showing 1 changed file with 11 additions and 0 deletions.
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

0 comments on commit 7fe270c

Please sign in to comment.