From de70cbc93cb350dbde70f18203596c3e3f8c06bd Mon Sep 17 00:00:00 2001 From: Raz Date: Sun, 19 Jan 2025 07:14:37 +0100 Subject: [PATCH] fix issue with locatime --- tournaments/models/tournament.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index 812efae..7cfd1a6 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -807,10 +807,10 @@ class Tournament(models.Model): if self.end_date is not None: return is_build_and_not_empty - if timezone.now().date() >= timezone.localtime(self.start_date): + if timezone.now() >= timezone.localtime(self.start_date): return is_build_and_not_empty - minimum_publish_date = timezone.localtime(self.creation_date).replace(hour=9, minute=0) + timedelta(days=1) - return timezone.now() >= minimum_publish_date + minimum_publish_date = self.creation_date.replace(hour=9, minute=0) + timedelta(days=1) + return timezone.now() >= timezone.localtime(minimum_publish_date) def display_teams(self): if self.end_date is not None: