diff --git a/src/quicreach.cpp b/src/quicreach.cpp index 1609fcc..8183fbd 100644 --- a/src/quicreach.cpp +++ b/src/quicreach.cpp @@ -330,7 +330,11 @@ void DumpResultsToFile() { char UtcDateTime[256]; time_t Time = time(nullptr); struct tm Tm; +#ifdef _WIN32 + gmtime_s(&Tm, &Time); +#else gmtime_r(&Time, &Tm); +#endif strftime(UtcDateTime, sizeof(UtcDateTime), "%Y.%m.%d-%H:%M:%S", &Tm); fprintf(File, "%s,%u,%u,%u,%u,%u,%u,%u,%u\n", UtcDateTime, Results.TotalCount.load(), Results.ReachableCount.load(), Results.TooMuchCount.load(), Results.MultiRttCount.load(),