From 5a89c18cd69d70eeb341dbd15dc87c056e6e22ce Mon Sep 17 00:00:00 2001 From: Ace Date: Mon, 27 Jan 2020 23:34:35 +0100 Subject: [PATCH] Tiny back-end improvement --- modules/inkycal_weather.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/inkycal_weather.py b/modules/inkycal_weather.py index 1510067..294e8e4 100644 --- a/modules/inkycal_weather.py +++ b/modules/inkycal_weather.py @@ -178,10 +178,10 @@ def generate_image(): hour_gap = 3 """Prepare timings for forecasts""" - fc1 = now.replace(hours = + hour_gap) - fc2 = now.replace(hours = + hour_gap + 3) - fc3 = now.replace(hours = + hour_gap + 6) - fc4 = now.replace(hours = + hour_gap + 9) + fc1 = now.replace(hours = + hour_gap).floor('hour') + fc2 = now.replace(hours = + hour_gap + 3).floor('hour') + fc3 = now.replace(hours = + hour_gap + 6).floor('hour') + fc4 = now.replace(hours = + hour_gap + 9).floor('hour') """Prepare forecast objects for the specified timings""" forecast_fc1 = forecast.get_weather_at(fc1.datetime)