From 7751596620ab869ff23257c834a06b805c932a3c Mon Sep 17 00:00:00 2001
From: Lene Wasskog <lene.wasskog@nibio.no>
Date: Wed, 26 Feb 2025 10:45:54 +0100
Subject: [PATCH] fix: Localize start time

---
 PSILARTEMP.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PSILARTEMP.py b/PSILARTEMP.py
index 35829d0..3edc985 100755
--- a/PSILARTEMP.py
+++ b/PSILARTEMP.py
@@ -53,9 +53,9 @@ if year > today.year:
     exit(0)
 
 # If we are before the recurring start date, exit nicely
-start_time = datetime.strptime(f"{year}-{recurring_start_date}","%Y-%m-%d")
+start_time = local_timezone.localize(datetime.strptime(f"{year}-{recurring_start_date}","%Y-%m-%d"))
 if today <= start_time:
-    print(f"Today is before the configured start time of {start_time}. Exiting.")
+    print(f"Today is before the configured model start {start_time}. Exiting.")
     exit(0)
     
 # """
-- 
GitLab