ISSUE #878. Try catch Clock timezones
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
This commit is contained in:
parent
43862ceb34
commit
4cb7e55a91
|
@ -22,8 +22,7 @@ waybar::modules::Clock::Clock(const std::string& id, const Json::Value& config)
|
|||
is_timezoned_list_in_tooltip_(false) {
|
||||
if (config_["timezones"].isArray() && !config_["timezones"].empty()) {
|
||||
for (const auto& zone_name : config_["timezones"]) {
|
||||
if (!zone_name.isString() || zone_name.asString().empty())
|
||||
continue;
|
||||
if (!zone_name.isString() || zone_name.asString().empty()) continue;
|
||||
try {
|
||||
time_zones_.push_back(date::locate_zone(zone_name.asString()));
|
||||
} catch (const std::exception& e) {
|
||||
|
|
Loading…
Reference in New Issue