diff --git a/src/renderer/widgets/IWidget.cpp b/src/renderer/widgets/IWidget.cpp index 417ceb0..0b9b366 100644 --- a/src/renderer/widgets/IWidget.cpp +++ b/src/renderer/widgets/IWidget.cpp @@ -36,9 +36,11 @@ static void replaceAll(std::string& str, const std::string& from, const std::str } static std::string getTime() { - const auto HHMMSS = std::chrono::hh_mm_ss{std::chrono::system_clock::now() - std::chrono::floor(std::chrono::system_clock::now())}; - const auto HRS = HHMMSS.hours().count(); - const auto MINS = HHMMSS.minutes().count(); + const auto current_zone = std::chrono::current_zone(); + const auto HHMMSS = std::chrono::hh_mm_ss{current_zone->to_local(std::chrono::system_clock::now()) - + std::chrono::floor(current_zone->to_local(std::chrono::system_clock::now()))}; + const auto HRS = HHMMSS.hours().count(); + const auto MINS = HHMMSS.minutes().count(); return (HRS < 10 ? "0" : "") + std::to_string(HRS) + ":" + (MINS < 10 ? "0" : "") + std::to_string(MINS); }