Corrections sur les dates affichées
This commit is contained in:
parent
7d02f29e48
commit
ae3ef21a2f
|
@ -32,7 +32,8 @@ class Tirage(models.Model):
|
|||
default=False)
|
||||
|
||||
def date_no_seconds(self):
|
||||
return self.fermeture.strftime('%d %b %Y %H:%M')
|
||||
return self.fermeture.astimezone(timezone.get_current_timezone()) \
|
||||
.strftime('%d %b %Y %H:%M')
|
||||
|
||||
def __str__(self):
|
||||
return "%s - %s" % (self.title, self.date_no_seconds())
|
||||
|
@ -89,7 +90,8 @@ class Spectacle(models.Model):
|
|||
return "%d" % calendar.timegm(self.date.utctimetuple())
|
||||
|
||||
def date_no_seconds(self):
|
||||
return self.date.strftime('%d %b %Y %H:%M')
|
||||
return self.date.astimezone(timezone.get_current_timezone()) \
|
||||
.strftime('%d %b %Y %H:%M')
|
||||
|
||||
def __str__(self):
|
||||
return "%s - %s, %s, %.02f€" % (self.title, self.date_no_seconds(),
|
||||
|
|
Loading…
Reference in a new issue