From 52a762f55f097c60c90707868fec32dc5c5a9514 Mon Sep 17 00:00:00 2001 From: emilyboda Date: Fri, 5 Jun 2020 11:55:07 -0400 Subject: [PATCH] fixed timezone bug the correct way --- 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 3369dfc..5f5d974 100644 --- a/modules/inkycal_weather.py +++ b/modules/inkycal_weather.py @@ -283,7 +283,7 @@ def generate_image(): fill_width = 0.9) """Add weather details in column 4 (forecast 1)""" - write_text(coloumn_width, row_height, to_hours(fc1, simple=True), + write_text(coloumn_width, row_height, to_hours(fc1.to(get_tz()), simple=True), text_fc1_pos, font = font) write_text(coloumn_width, row_height, weathericons[weather_icon_fc1], icon_fc1_pos, font = w_font, fill_height = 1.0) @@ -292,7 +292,7 @@ def generate_image(): temperature_fc1)) """Add weather details in column 5 (forecast 2)""" - write_text(coloumn_width, row_height, to_hours(fc2, simple=True), + write_text(coloumn_width, row_height, to_hours(fc2.to(get_tz()), simple=True), text_fc2_pos, font = font) write_text(coloumn_width, row_height, weathericons[weather_icon_fc2], icon_fc2_pos, font = w_font, fill_height = 1.0) @@ -301,7 +301,7 @@ def generate_image(): temperature_fc2)) """Add weather details in column 6 (forecast 3)""" - write_text(coloumn_width, row_height, to_hours(fc3, simple=True), + write_text(coloumn_width, row_height, to_hours(fc3.to(get_tz()), simple=True), text_fc3_pos, font = font) write_text(coloumn_width, row_height, weathericons[weather_icon_fc3], icon_fc3_pos, font = w_font, fill_height = 1.0) @@ -310,7 +310,7 @@ def generate_image(): temperature_fc3)) """Add weather details in coloumn 7 (forecast 4)""" - write_text(coloumn_width, row_height, to_hours(fc4, simple=True), + write_text(coloumn_width, row_height, to_hours(fc4.to(get_tz()), simple=True), text_fc4_pos, font = font) write_text(coloumn_width, row_height, weathericons[weather_icon_fc4], icon_fc4_pos, font = w_font, fill_height = 1.0)