change to system_clock for times converted to time_t

This commit is contained in:
Lion Kortlepel
2022-11-11 21:40:04 +01:00
parent 48135f4544
commit 0327b41611
4 changed files with 8 additions and 8 deletions

View File

@@ -323,7 +323,7 @@ void TConsole::Command_Debug(const std::string&, const std::vector<std::string>&
}
State += "Disconnected";
}
auto Now = std::chrono::high_resolution_clock::now();
auto Now = std::chrono::system_clock::now();
auto Seconds = std::chrono::duration_cast<std::chrono::seconds>(Now - Locked->ConnectionTime);
std::string ConnectedSince = fmt::format("{:%Y/%m/%d %H:%M:%S}, {:%H:%M:%S} ago ({} seconds)",
fmt::localtime(std::chrono::system_clock::to_time_t(Locked->ConnectionTime)),