Skip to content

Commit

Permalink
[Bug] Deprecated zone time to avoid errors on older versions of Windo…
Browse files Browse the repository at this point in the history
…ws 10 (#375)
  • Loading branch information
cddjr committed Jun 3, 2022
1 parent 781bed4 commit dc98c1e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion user/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ void AUMLogger::Create()
void AUMLogger::Write(std::string verbosity, std::string source, std::string message)
{
std::stringstream ss;
ss << std::format("[{:%EX}]", std::chrono::zoned_time(std::chrono::current_zone(), std::chrono::system_clock::now()));
// FIXME: std::chrono::current_zone requires Windows 10 version 1903/19H1 or later.
// ss << std::format("[{:%EX}]", std::chrono::zoned_time(std::chrono::current_zone(), std::chrono::system_clock::now()));
ss << std::format("[{:%EX}]", std::chrono::system_clock::now());
ss << "[" << verbosity << " - " << source << "] " << message << std::endl;
std::cout << ss.str();

Expand Down

0 comments on commit dc98c1e

Please sign in to comment.