Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win32 not gmtime_r function use gmtime_s function #60

Open
wants to merge 1 commit into
base: live
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/log_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down