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_,
|
waybar_time wtime = {locale_,
|
||||||
date::make_zoned(time_zone_, date::floor<std::chrono::seconds>(now))};
|
date::make_zoned(time_zone_, date::floor<std::chrono::seconds>(now))};
|
||||||
|
|
||||||
|
std::string text;
|
||||||
if (!fixed_time_zone_) {
|
if (!fixed_time_zone_) {
|
||||||
// As date dep is not fully compatible, prefer fmt
|
// As date dep is not fully compatible, prefer fmt
|
||||||
tzset();
|
tzset();
|
||||||
auto localtime = fmt::localtime(std::chrono::system_clock::to_time_t(now));
|
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);
|
label_.set_markup(text);
|
||||||
} else {
|
} else {
|
||||||
auto text = fmt::format(format_, wtime);
|
text = fmt::format(format_, wtime);
|
||||||
label_.set_markup(text);
|
label_.set_markup(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user