From b04d37c21912e8e7d99382dbba5423597f5d9726 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 12 Oct 2020 17:40:00 +0100 Subject: [PATCH] Date shown on newswire --- webinterface.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/webinterface.py b/webinterface.py index da9dc37e..9e34d999 100644 --- a/webinterface.py +++ b/webinterface.py @@ -5513,7 +5513,10 @@ def htmlNewswire(newswire: str, nickname: str, moderator: bool, for dateStr, item in newswire.items(): publishedDate = \ datetime.strptime(dateStr, "%Y-%m-%d %H:%M:%S+00:00") - dateStrLink = publishedDate.strftime("%Y-%m-%d") + dateShown = publishedDate.strftime("%Y-%m-%d") + + dateStrLink = dateStr.replace('T', ' ') + dateStrLink = dateStrLink.replace('Z', '') moderatedItem = item[5] if moderatedItem and 'vote:' + nickname in item[2]: totalVotesStr = '' @@ -5529,8 +5532,7 @@ def htmlNewswire(newswire: str, nickname: str, moderator: bool, '' + totalVotesStr if moderator: htmlStr += \ - ' ' + dateStr.replace('+00:00', '') + \ - '' htmlStr += '' + \ '' + \ item[0] + '' + totalVotesStr - htmlStr += ' ' + dateStr.replace('+00:00', '') + htmlStr += ' ' + dateShown htmlStr += ''