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
1 changed files with 2 additions and 3 deletions

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"]) {
if (!zone_name.isString()) continue;
if (zone_name.asString().empty())
// nullptr means that local time should be shown
time_zones_.push_back(nullptr);
// local time should be shown
time_zones_.push_back(date::current_zone());
else
try {
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 (!time_zones_.size()) {
// nullptr means that local time should be shown
time_zones_.push_back(date::current_zone());
}