Skip to content
Merged
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
8 changes: 8 additions & 0 deletions include/crow/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,17 @@ namespace crow
tm my_tm;

#if defined(_MSC_VER) || defined(__MINGW32__)
#ifdef CROW_USE_LOCALTIMEZONE
localtime_s(&my_tm, &t);
#else
gmtime_s(&my_tm, &t);
#endif
#else
#ifdef CROW_USE_LOCALTIMEZONE
localtime_r(&t, &my_tm);
#else
gmtime_r(&t, &my_tm);
#endif
#endif

size_t sz = strftime(date, sizeof(date), "%Y-%m-%d %H:%M:%S", &my_tm);
Expand Down