Sanitize datetime strings for Python version compatability

This commit is contained in:
John Helmert
2019-08-02 10:41:24 -05:00
parent 26ab4c35a2
commit 3480faae74

View File

@@ -410,9 +410,9 @@ class Content(object):
yearsago = ((datetime.now() - dt).days / 365.2425) yearsago = ((datetime.now() - dt).days / 365.2425)
if yearsago > 0: if yearsago > 0:
return dt.strftime("%Y-%m-%d") return six.u(dt.strftime("%Y-%m-%d"))
else: else:
return dt.strftime("%m-%d %H:%M") return six.u(dt.strftime("%m-%d %H:%M"))
@staticmethod @staticmethod
def wrap_text(text, width): def wrap_text(text, width):