From 5f31171c3b51ea45b33bd71127a5d6af094cd851 Mon Sep 17 00:00:00 2001 From: emilyboda Date: Fri, 5 Jun 2020 11:54:28 -0400 Subject: [PATCH] removed timezone fix, as it was broken --- modules/inkycal_weather.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/inkycal_weather.py b/modules/inkycal_weather.py index e9d4943..3369dfc 100644 --- a/modules/inkycal_weather.py +++ b/modules/inkycal_weather.py @@ -171,7 +171,7 @@ def generate_image(): forecast = owm.three_hours_forecast(location) """Round the hour to the nearest multiple of 3""" - now = arrow.utcnow().to(get_tz()) + now = arrow.utcnow() if (now.hour % 3) != 0: hour_gap = 3 - (now.hour % 3) else: @@ -184,10 +184,10 @@ def generate_image(): fc4 = now.replace(hours = + hour_gap + 9).floor('hour') """Prepare forecast objects for the specified timings""" - forecast_fc1 = forecast.get_weather_at(fc1.datetime.astimezone(timezone('UTC'))) - forecast_fc2 = forecast.get_weather_at(fc2.datetime.astimezone(timezone('UTC'))) - forecast_fc3 = forecast.get_weather_at(fc3.datetime.astimezone(timezone('UTC'))) - forecast_fc4 = forecast.get_weather_at(fc4.datetime.astimezone(timezone('UTC'))) + forecast_fc1 = forecast.get_weather_at(fc1.datetime) + forecast_fc2 = forecast.get_weather_at(fc2.datetime) + forecast_fc3 = forecast.get_weather_at(fc3.datetime) + forecast_fc4 = forecast.get_weather_at(fc4.datetime) """Get the current temperature and forcasts temperatures""" temperature_now = to_units(weather.get_temperature()['temp'])