diff --git a/src/log_api.c b/src/log_api.c index f87ad65..a295872 100644 --- a/src/log_api.c +++ b/src/log_api.c @@ -168,7 +168,12 @@ void get_now_time_str(char * buffer, int bufLen, int timeOffset) { rawtime += timeOffset; } + //gmtime_r(&rawtime, &timeinfo); +#ifdef WIN32 + gmtime_s(&timeinfo, &rawtime); +#else gmtime_r(&rawtime, &timeinfo); +#endif sls_rfc822_date(buffer, &timeinfo); }