From 3480faae74c6d0b5e4dd3be352fab109d2127a07 Mon Sep 17 00:00:00 2001 From: John Helmert Date: Fri, 2 Aug 2019 10:41:24 -0500 Subject: [PATCH] Sanitize datetime strings for Python version compatability --- tuir/content.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tuir/content.py b/tuir/content.py index d01b293..0bf3545 100644 --- a/tuir/content.py +++ b/tuir/content.py @@ -410,9 +410,9 @@ class Content(object): yearsago = ((datetime.now() - dt).days / 365.2425) if yearsago > 0: - return dt.strftime("%Y-%m-%d") + return six.u(dt.strftime("%Y-%m-%d")) else: - return dt.strftime("%m-%d %H:%M") + return six.u(dt.strftime("%m-%d %H:%M")) @staticmethod def wrap_text(text, width):