mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix(clock): lower precision of zoned_time to avoid fractional seconds in output
This commit is contained in:
@ -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<std::chrono::seconds>(now))};
|
||||
|
||||
auto text = fmt::format(format_, wtime);
|
||||
label_.set_markup(text);
|
||||
|
Reference in New Issue
Block a user