mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix: type
This commit is contained in:
parent
cef5b27b48
commit
a871dcaebe
@ -43,14 +43,15 @@ auto waybar::modules::Clock::update() -> void {
|
||||
waybar_time wtime = {locale_,
|
||||
date::make_zoned(time_zone_, date::floor<std::chrono::seconds>(now))};
|
||||
|
||||
std::string text;
|
||||
if (!fixed_time_zone_) {
|
||||
// As date dep is not fully compatible, prefer fmt
|
||||
tzset();
|
||||
auto localtime = fmt::localtime(std::chrono::system_clock::to_time_t(now));
|
||||
auto text = fmt::format(format_, localtime);
|
||||
text = fmt::format(format_, localtime);
|
||||
label_.set_markup(text);
|
||||
} else {
|
||||
auto text = fmt::format(format_, wtime);
|
||||
text = fmt::format(format_, wtime);
|
||||
label_.set_markup(text);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user