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