mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
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) {
|
is_timezoned_list_in_tooltip_(false) {
|
||||||
if (config_["timezones"].isArray() && !config_["timezones"].empty()) {
|
if (config_["timezones"].isArray() && !config_["timezones"].empty()) {
|
||||||
for (const auto& zone_name : config_["timezones"]) {
|
for (const auto& zone_name : config_["timezones"]) {
|
||||||
if (!zone_name.isString() || zone_name.asString().empty())
|
if (!zone_name.isString() || zone_name.asString().empty()) continue;
|
||||||
continue;
|
|
||||||
try {
|
try {
|
||||||
time_zones_.push_back(date::locate_zone(zone_name.asString()));
|
time_zones_.push_back(date::locate_zone(zone_name.asString()));
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user