diff --git a/gestion/mail/mail.py b/gestion/mail/mail.py index 7f6c07d9..8e8b9fb1 100644 --- a/gestion/mail/mail.py +++ b/gestion/mail/mail.py @@ -35,10 +35,11 @@ templateLoader = jinja2.FileSystemLoader( searchpath=["/", template_path] ) templateEnv = jinja2.Environment( loader=templateLoader ) def format_date(d): + # Beware: l'encodage utilisé ici dépend de la locale choisie plus bas if 'fr_FR' in locale.getlocale(): - return d.strftime('%A %d %B %Y') + return d.strftime('%A %d %B %Y').decode('utf-8') else: - return d.strftime('%A, %B %d %Y') + return d.strftime('%A, %B %d %Y').decode('utf-8') def given_name(adh): if 'club' in adh['objectClass']: