Skip to content

Commit 86be21a

Browse files
author
Robert Schmidtke
committed
fix sign
1 parent ce42783 commit 86be21a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/_libs/src/vendored/numpy/datetime/np_datetime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ static int scaleAndOffset(int64_t timestamp, int64_t scale, int64_t offset,
349349
// if the requested timestamp is just below that, doing the calculation
350350
// in reverse from the absolute minimum timestamp could work
351351
if (timestamp == min_scalable_timestamp - 1) {
352-
const int64_t min_offset = (NPY_MIN_INT64 + 1) % scale;
352+
const int64_t min_offset = scale + (NPY_MIN_INT64 + 1) % scale;
353353
if (checked_int64_sub(offset, min_offset, result) != 0) {
354354
return 1;
355355
}

0 commit comments

Comments
 (0)