🏡 index : ~doyle/dave.git

author Jordan Doyle <jordan@doyle.wf> 2017-08-31 10:51:10.0 -07:00:00
committer GitHub <noreply@github.com> 2017-08-31 10:51:10.0 -07:00:00
commit
4ec579f2cc07044ad14195d96fd055081cbf61d6 [patch]
tree
d8ae4921cb9713203dc06782b590294ef0d74716
parent
ee944c62c4e0032dff0dd43c392fa01f8d5842b7
download
4ec579f2cc07044ad14195d96fd055081cbf61d6.tar.gz

Default to UTC if timezonedb fails



Diff

 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
+++ a/dave/modules/weather.py
@@ -53,9 +53,9 @@
        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"
    ))