From 412b5796d24ae0024c28433faebeb639ef0f8a97 Mon Sep 17 00:00:00 2001 From: vis4rd Date: Fri, 1 Nov 2024 23:49:32 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Fix=20CI=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/engine/module/log/src/Logging.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/engine/module/log/src/Logging.cpp b/src/engine/module/log/src/Logging.cpp index 4b2019d8..d5c2a697 100644 --- a/src/engine/module/log/src/Logging.cpp +++ b/src/engine/module/log/src/Logging.cpp @@ -1,6 +1,7 @@ #include "log/Logging.hpp" #include +#include #include #include @@ -114,14 +115,13 @@ static std::chrono::system_clock::time_point getLocalTime() { const std::time_t now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); - std::tm local_tm{}; - ::localtime_s(&local_tm, &now); + std::tm *local_tm = std::localtime(&now); return std::chrono::sys_days{ - std::chrono::year{local_tm.tm_year + 1900} / (local_tm.tm_mon + 1) - / (local_tm.tm_mday)} - + std::chrono::hours{local_tm.tm_hour} + std::chrono::minutes{local_tm.tm_min} - + std::chrono::seconds{local_tm.tm_sec}; + std::chrono::year{local_tm->tm_year + 1900} / (local_tm->tm_mon + 1) + / (local_tm->tm_mday)} + + std::chrono::hours{local_tm->tm_hour} + std::chrono::minutes{local_tm->tm_min} + + std::chrono::seconds{local_tm->tm_sec}; } else {