From 4e6744590494547d640e0ff29797172284d262b7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 31 Jul 2019 14:11:09 +0100 Subject: [PATCH] Less cryptic published dates --- webinterface.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webinterface.py b/webinterface.py index f19d92e44..12b00b17b 100644 --- a/webinterface.py +++ b/webinterface.py @@ -9,6 +9,7 @@ __status__ = "Production" import json import time import os +from datetime import datetime from shutil import copyfile from pprint import pprint from person import personBoxJson @@ -539,7 +540,10 @@ def individualPostAsHtml(baseDir: str, \ ' ' \ ' ' - footerStr=''+postJsonObject['object']['published']+'\n' + publishedStr=postJsonObject['object']['published'] + datetimeObject = datetime.strptime(publishedStr,"%Y-%m-%dT%H:%M:%SZ") + publishedStr=datetimeObject.strftime("%a %b %d, %H:%M") + footerStr=''+publishedStr+'\n' if showIcons: footerStr='
' footerStr+='' @@ -548,7 +552,7 @@ def individualPostAsHtml(baseDir: str, \ footerStr+='' footerStr+='' footerStr+='' - footerStr+=''+postJsonObject['object']['published']+'' + footerStr+=''+publishedStr+'' footerStr+='
' if not postJsonObject['object']['sensitive']: