
std::localtime is not thread-safe as it returns a pointer to a static internal buffer. In a multi-threaded environment like this library, you should use localtime_r (on POSIX) to ensure thread safety.
std::tm tm_buf;
localtime_r(&time_value, &tm_buf);
ost << std::put_time(&tm_buf, "%Y-%m-%d %H:%M:%S")
Originally posted by @gemini-code-assist[bot] in #33 (comment)
std::localtimeis not thread-safe as it returns a pointer to a static internal buffer. In a multi-threaded environment like this library, you should uselocaltime_r(on POSIX) to ensure thread safety.Originally posted by @gemini-code-assist[bot] in #33 (comment)