Rewview changes.

Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
This commit is contained in:
Viktar Lukashonak 2023-07-24 10:16:38 +03:00
parent 4d9e0ea802
commit d01ce7d812
No known key found for this signature in database
GPG Key ID: 08A413AA87200A6F

View File

@ -24,8 +24,8 @@ waybar::modules::Clock::Clock(const std::string& id, const Json::Value& config)
for (const auto& zone_name : config_["timezones"]) { for (const auto& zone_name : config_["timezones"]) {
if (!zone_name.isString()) continue; if (!zone_name.isString()) continue;
if (zone_name.asString().empty()) if (zone_name.asString().empty())
// nullptr means that local time should be shown // local time should be shown
time_zones_.push_back(nullptr); time_zones_.push_back(date::current_zone());
else else
try { try {
time_zones_.push_back(date::locate_zone(zone_name.asString())); time_zones_.push_back(date::locate_zone(zone_name.asString()));
@ -46,7 +46,6 @@ waybar::modules::Clock::Clock(const std::string& id, const Json::Value& config)
// If all timezones are parsed and no one is good // If all timezones are parsed and no one is good
if (!time_zones_.size()) { if (!time_zones_.size()) {
// nullptr means that local time should be shown
time_zones_.push_back(date::current_zone()); time_zones_.push_back(date::current_zone());
} }