From 4ec579f2cc07044ad14195d96fd055081cbf61d6 Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Thu, 31 Aug 2017 10:51:10 -0700 Subject: [PATCH] Default to UTC if timezonedb fails --- dave/modules/weather.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dave/modules/weather.py b/dave/modules/weather.py index b3ecc57..2c43424 100644 --- a/dave/modules/weather.py +++ b/dave/modules/weather.py @@ -53,9 +53,9 @@ def weather(bot, args, sender, source): int(round(weather["currently"]["windSpeed"])), int(round(weather["currently"]["windSpeed"] * 1.60934)), int(round(weather["currently"]["humidity"] * 100)), - arrow.get(weather["daily"]["data"][0]["sunriseTime"]).to(timezone["zoneName"]).strftime("%H:%M").lower(), - arrow.get(weather["daily"]["data"][0]["sunsetTime"]).to(timezone["zoneName"]).strftime("%H:%M").lower(), - timezone["abbreviation"] + arrow.get(weather["daily"]["data"][0]["sunriseTime"]).to(timezone["zoneName"] or "UTC").strftime("%H:%M").lower(), + arrow.get(weather["daily"]["data"][0]["sunsetTime"]).to(timezone["zoneName"] or "UTC").strftime("%H:%M").lower(), + timezone["abbreviation"] or "UTC" )) -- libgit2 1.7.2