Skip to content

Commit 7fe270c

Browse files
authored
TST: Add test for pd.Timestamp DST transition (#60346)
1 parent e7d1964 commit 7fe270c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pandas/tests/scalar/timestamp/test_arithmetic.py

+11
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,17 @@ def test_timestamp_add_timedelta_push_over_dst_boundary(self, tz):
314314

315315
assert result == expected
316316

317+
def test_timestamp_dst_transition(self):
318+
# GH 60084
319+
dt_str = "2023-11-05 01:00-08:00"
320+
tz_str = "America/Los_Angeles"
321+
322+
ts1 = Timestamp(dt_str, tz=tz_str)
323+
ts2 = ts1 + Timedelta(hours=0)
324+
325+
assert ts1 == ts2
326+
assert hash(ts1) == hash(ts2)
327+
317328

318329
class SubDatetime(datetime):
319330
pass

0 commit comments

Comments
 (0)