Sanitize datetime strings for Python version compatability
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user