mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Rewview changes.
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
This commit is contained in:
parent
4d9e0ea802
commit
d01ce7d812
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user