From c05982571895dd5a6c569e88eb4407dd1836577a Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 31 Aug 2023 22:03:08 +0800 Subject: [PATCH] timezone fix (reversed?) --- stockTicker.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stockTicker.py b/stockTicker.py index 071c472..7e2fc37 100755 --- a/stockTicker.py +++ b/stockTicker.py @@ -7284,7 +7284,10 @@ class StockTicker(): #TIMEZONE NOT WORKING?!?!?!!?!?!?!?!?!?? timezone = pytz.timezone(settings['timezone']) - + if '+' in timezone: + timezone = timezone.replace('+', '-') + elif '-' in timezone: + timezone = timezone.replace('-', '+') font = graphics.Font() font.LoadFont("fonts/6x12.bdf") # Change this to the path of your desired font file font2 = graphics.Font() @@ -7553,6 +7556,10 @@ class StockTicker(): # Create a canvas to draw on canvas = self.double_buffer timezone = pytz.timezone(settings['timezone']) + if '+' in timezone: + timezone = timezone.replace('+', '-') + elif '-' in timezone: + timezone = timezone.replace('-', '+') # Set the font and text color font = graphics.Font() font.LoadFont("fonts/clR6x12.bdf")