diff --git a/Core/include/Acts/Utilities/Logger.hpp b/Core/include/Acts/Utilities/Logger.hpp index 48cadb49ec4..83dc989ca85 100644 --- a/Core/include/Acts/Utilities/Logger.hpp +++ b/Core/include/Acts/Utilities/Logger.hpp @@ -482,7 +482,9 @@ class TimedOutputDecorator final : public OutputDecorator { char buffer[20]; time_t t{}; std::time(&t); - std::strftime(buffer, sizeof(buffer), m_format.c_str(), localtime(&t)); + struct tm tbuf {}; + std::strftime(buffer, sizeof(buffer), m_format.c_str(), + localtime_r(&t, &tbuf)); return buffer; }