Skip to content

Commit a5201f9

Browse files
committed
Fixed pydatetime truncation
1 parent 7471721 commit a5201f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/_libs/src/ujson/python/objToJSON.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ static npy_datetime PyDateTimeToEpoch(PyObject *obj, NPY_DATETIMEUNIT base) {
505505
// return NULL;
506506
}
507507

508-
npy_datetime npy_dt = npy_datetimestruct_to_datetime(base, &dts);
508+
npy_datetime npy_dt = npy_datetimestruct_to_datetime(NPY_FR_ns, &dts);
509509
return NpyDateTimeToEpoch(npy_dt, base);
510510
}
511511

0 commit comments

Comments
 (0)