Skip to content

Commit c8d0f01

Browse files
committed
Fix timedelta conversion
1 parent 0485f57 commit c8d0f01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SEPythonModule/src/lib/SePyMain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct std_duration_from_timedelta {
9191

9292
static void construct(PyObject* obj_ptr, py::converter::rvalue_from_python_stage1_data* data) {
9393
auto timedelta = reinterpret_cast<PyDateTime_Delta*>(obj_ptr);
94-
auto days = std::chrono::hours(PyDateTime_DELTA_GET_DAYS(timedelta) * 24);
94+
auto days = std::chrono::hours(PyDateTime_DELTA_GET_DAYS(timedelta) * 24l);
9595
auto seconds = std::chrono::seconds(PyDateTime_DELTA_GET_SECONDS(timedelta));
9696
auto microseconds = std::chrono::microseconds(PyDateTime_DELTA_GET_MICROSECONDS(timedelta));
9797
auto duration = days + seconds + microseconds;

0 commit comments

Comments
 (0)