Skip to content

Commit 6dc51ee

Browse files
committed
avoid utcfromtimestamp
1 parent 4776d69 commit 6dc51ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/tests/scalar/timestamp/methods/test_replace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def test_replace_preserves_fold(self, fold):
199199
def test_replace_updates_unit(self):
200200
# GH#57749
201201
ts = Timestamp("2023-07-15 23:08:12.134567123")
202-
ts2 = Timestamp(datetime.utcfromtimestamp(int(ts.timestamp())))
202+
ts2 = Timestamp("2023-07-15 23:08:12.000000")
203203
assert ts2.unit == "us"
204204
result = ts2.replace(microsecond=ts.microsecond, nanosecond=ts.nanosecond)
205205
assert result.unit == "ns"

0 commit comments

Comments
 (0)