From c7fe1a1e22e5ff488bfdf4415505ed0c5564d364 Mon Sep 17 00:00:00 2001 From: Lea Date: Wed, 28 Aug 2024 17:19:38 +0200 Subject: [PATCH] bugfix: time with 24:00... and assign string properly --- arztapi/APIHandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arztapi/APIHandler.py b/arztapi/APIHandler.py index a54a741..d7db73d 100644 --- a/arztapi/APIHandler.py +++ b/arztapi/APIHandler.py @@ -239,7 +239,7 @@ class APIHandler: if "24:00" in date_string: # Sometimes the API returns 24:00 as time, so filtering for those cases and replacing it with a minute # less to work with propery input - date_string.replace("24:00", "23:59") + date_string =date_string.replace("24:00", "23:59") # Add the current year since it is not part of the original date sent by the API parsed_date = datetime.strptime(date_string, format_string).replace(year=datetime.now().year)