Fix Timestamp.from_datetime returning wrong value for pre-epoch datetimes (#662)

This commit is contained in:
Kadir Can Ozden 2026-06-02 15:41:52 +03:00 committed by GitHub
parent b83a0aa62b
commit 98d2c7907d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -167,4 +167,4 @@ class Timestamp:
:rtype: Timestamp
"""
return Timestamp(seconds=int(dt.timestamp()), nanoseconds=dt.microsecond * 1000)
return Timestamp(seconds=int(dt.timestamp() // 1), nanoseconds=dt.microsecond * 1000)