Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7f3aeac

Browse files
committed
Merge pull request #2857 from certik/backport2856
FIX: Use the NPY_TIME_T macro everywhere
2 parents c2b2422 + e54f750 commit 7f3aeac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

numpy/core/src/multiarray/datetime_strings.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ convert_datetimestruct_utc_to_local(npy_datetimestruct *out_dts_local,
189189
* we drop the seconds value from the npy_datetimestruct, everything
190190
* is ok for this operation.
191191
*/
192-
rawtime = (time_t)get_datetimestruct_days(out_dts_local) * 24 * 60 * 60;
192+
rawtime = (NPY_TIME_T)get_datetimestruct_days(out_dts_local) * 24 * 60 * 60;
193193
rawtime += dts_utc->hour * 60 * 60;
194194
rawtime += dts_utc->min * 60;
195195

@@ -207,7 +207,7 @@ convert_datetimestruct_utc_to_local(npy_datetimestruct *out_dts_local,
207207

208208
/* Extract the timezone offset that was applied */
209209
rawtime /= 60;
210-
localrawtime = (time_t)get_datetimestruct_days(out_dts_local) * 24 * 60;
210+
localrawtime = (NPY_TIME_T)get_datetimestruct_days(out_dts_local) * 24 * 60;
211211
localrawtime += out_dts_local->hour * 60;
212212
localrawtime += out_dts_local->min;
213213

0 commit comments

Comments
 (0)