Skip to content

Commit 9cdd518

Browse files
committed
Fix DeprecationWarning in codecs/datetime.pyx
This fixes the `DeprecationWarning: an integer is required (got type float).` in `codecs/datetime.pyx`
1 parent cb99c0c commit 9cdd518

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codecs/datetime.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cdef int32_t pg_epoch_datetime_ts = \
2020

2121
pg_epoch_datetime_utc = datetime.datetime(2000, 1, 1, tzinfo=utc)
2222
cdef int32_t pg_epoch_datetime_utc_ts = \
23-
<int32_t>cpython.PyLong_AsLong(pg_epoch_datetime_utc.timestamp())
23+
<int32_t>cpython.PyLong_AsLong(int(pg_epoch_datetime_utc.timestamp()))
2424

2525
pg_epoch_date = datetime.date(2000, 1, 1)
2626
cdef int32_t pg_date_offset_ord = \

0 commit comments

Comments
 (0)