From 33f170dd3e836f72fc1f4010f01fc67c1f0d48d6 Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Wed, 24 Sep 2025 08:48:02 +0200 Subject: [PATCH] Replace timezone.localtime with local_planned_start_date method --- tournaments/models/tournament.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index 7472d8d..036cb98 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -2146,7 +2146,7 @@ class Tournament(BaseModel): for match in planned_matches: # Convert to local time zone - local_date = timezone.localtime(match.planned_start_date) + local_date = match.local_planned_start_date() day_key = local_date.date() days.add(day_key) @@ -2171,7 +2171,7 @@ class Tournament(BaseModel): # Group matches by hour matches_by_hour = {} for match in matches_by_day[selected_day]: - local_time = timezone.localtime(match.planned_start_date) + local_time = match.local_planned_start_date() hour_key = local_time.strftime('%H:%M') if hour_key not in matches_by_hour: