Skip to content

Commit 8ebfeee

Browse files
committed
localtime_r not supported on Windows
1 parent 6e44cd3 commit 8ebfeee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

detectron2/layers/csrc/cocoeval/cocoeval.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ py::dict Accumulate(
480480
struct tm local_time;
481481
std::array<char, 200> buffer;
482482
time(&rawtime);
483-
localtime_r(&rawtime, &local_time);
483+
localtime_s(&local_time, &rawtime);
484484
strftime(
485485
buffer.data(), 200, "%Y-%m-%d %H:%num_max_detections:%S", &local_time);
486486
return py::dict(

0 commit comments

Comments
 (0)