From c8c15bb8e16fbba83b5a59f6a19e3b05321f2d4b Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Thu, 17 Aug 2023 11:20:37 +0200 Subject: [PATCH] fix local --- scores/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scores/models.py b/scores/models.py index f4e8a51..3a0cc1f 100644 --- a/scores/models.py +++ b/scores/models.py @@ -131,13 +131,13 @@ class Match(models.Model): return "Temps de jeu" else : _hours = int(_seconds / 3600) - if _hours < -2 and self.hasEnded(): + if _hours < -1 and self.hasEnded(): return "Démarrage prévu" else : return "Démarrage prévu dans" def duration(self): - locale.setlocale(locale.LC_ALL, '') + locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8') _seconds = 0 if self.enddate: _seconds = (self.enddate - self.date).total_seconds() @@ -150,7 +150,7 @@ class Match(models.Model): return f"{_hours:02d}h{_minutes:02d}min" else : _hours = int(_seconds / 3600) - if _hours < -2 and self.hasEnded() == False: + if _hours < -1 and self.hasEnded() == False: return self.date.strftime("%A %d %B à %H:%M") else : _seconds = _seconds * -1