diff --git a/include/modules/clock.hpp b/include/modules/clock.hpp index bb63241d..e3873a6d 100644 --- a/include/modules/clock.hpp +++ b/include/modules/clock.hpp @@ -14,7 +14,7 @@ namespace waybar::modules { struct waybar_time { std::locale locale; - date::zoned_time ztime; + date::zoned_seconds ztime; }; class Clock : public ALabel { diff --git a/src/modules/clock.cpp b/src/modules/clock.cpp index 5655168f..7fa0ad63 100644 --- a/src/modules/clock.cpp +++ b/src/modules/clock.cpp @@ -37,8 +37,9 @@ auto waybar::modules::Clock::update() -> void { // Time zone can change. Be sure to pick that. time_zone_ = date::current_zone(); } - auto now = std::chrono::system_clock::now(); - waybar_time wtime = {locale_, date::make_zoned(time_zone_, now)}; + auto now = std::chrono::system_clock::now(); + waybar_time wtime = {locale_, + date::make_zoned(time_zone_, date::floor(now))}; auto text = fmt::format(format_, wtime); label_.set_markup(text);