diff --git a/runtime/Includes/PreCompiled.h b/runtime/Includes/PreCompiled.h index d900ce8..653f085 100644 --- a/runtime/Includes/PreCompiled.h +++ b/runtime/Includes/PreCompiled.h @@ -5,6 +5,7 @@ #include #include + #include #include #include @@ -12,6 +13,7 @@ #include #include #include +#include #include diff --git a/runtime/Sources/Core/Logs.cpp b/runtime/Sources/Core/Logs.cpp index f61ec99..780cb15 100644 --- a/runtime/Sources/Core/Logs.cpp +++ b/runtime/Sources/Core/Logs.cpp @@ -47,9 +47,15 @@ namespace mlx default: break; } + /* const std::chrono::zoned_time current_time{ std::chrono::current_zone(), std::chrono::floor(std::chrono::system_clock::now()) }; - std::cout << Ansi::yellow << std::format("[{0:%H:%M:%S}] ", current_time) << Ansi::def << code_infos << message << std::endl; + */ + std::time_t now = time(0); + std::tm tstruct = *localtime(&now); + char buffer[80]; + std::strftime(buffer, sizeof(buffer), "[%X] ", &tstruct); + std::cout << Ansi::yellow << buffer << Ansi::def << code_infos << message << std::endl; if(type == LogType::FatalError) {