BE+FE: refactor timezone UTC additional work #1506

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2026-02-16 13:17:31 +11:00
parent e61bf097ac
commit 4b58f3b23f

View File

@@ -3,7 +3,7 @@
import datetime
from logger import mylog
from utils.datetime_utils import timeNowUTC
from utils.datetime_utils import timeNowTZ
# -------------------------------------------------------------------------------
@@ -28,11 +28,11 @@ class schedule_class:
# Initialize the last run time if never run before
if self.last_run == 0:
self.last_run = (
timeNowUTC(as_string=False) - datetime.timedelta(days=365)
timeNowTZ(as_string=False) - datetime.timedelta(days=365)
).replace(microsecond=0)
# get the current time with the currently specified timezone
nowTime = timeNowUTC(as_string=False)
nowTime = timeNowTZ(as_string=False)
# Run the schedule if the current time is past the schedule time we saved last time and
# (maybe the following check is unnecessary)