Handle slightly different date format

master
Bob Mottram 2019-08-20 13:54:52 +01:00
parent de2b514734
commit 33150046ba
1 changed files with 5 additions and 2 deletions

View File

@ -1169,8 +1169,11 @@ def individualPostAsHtml(baseDir: str, \
' </div>' ' </div>'
publishedStr=postJsonObject['object']['published'] publishedStr=postJsonObject['object']['published']
datetimeObject = datetime.strptime(publishedStr,"%Y-%m-%dT%H:%M:%SZ") if '.' not in publishedStr:
publishedStr=datetimeObject.strftime("%a %b %d, %H:%M") datetimeObject = datetime.strptime(publishedStr,"%Y-%m-%dT%H:%M:%SZ")
publishedStr=datetimeObject.strftime("%a %b %d, %H:%M")
else:
publishedStr=publishedStr.replace('T',' ').split('.')[0]
footerStr='<span class="'+timeClass+'">'+publishedStr+'</span>\n' footerStr='<span class="'+timeClass+'">'+publishedStr+'</span>\n'
announceStr='' announceStr=''