fix localtime call -> _r

This commit is contained in:
louiz’
2020-12-28 23:43:13 +01:00
parent 99bb8c977c
commit 752931b7a5
+1 -1
View File
@@ -930,7 +930,7 @@ void GetIrcConnectionInfoStep1(XmppComponent& component, AdhocSession& session,
#else
constexpr std::size_t timestamp_size{10 + 1 + 8 + 1};
char buf[timestamp_size] = {};
const auto res = std::strftime(buf, timestamp_size, "%F %T", localtime(&now_c, &tm));
const auto res = std::strftime(buf, timestamp_size, "%F %T", localtime_r(&now_c, &tm));
if (res > 0)
ss << " since " << buf;
#endif