Date format

merge-requests/8/head
Bob Mottram 2020-10-04 23:12:27 +01:00
parent 602714906a
commit a5291d4106
1 changed files with 3 additions and 2 deletions

View File

@ -145,8 +145,9 @@ def getRSSfromDict(baseDir: str, newswire: {},
None, domainFull,
'Newswire', translate)
for published, fields in newswire.items():
published = published.replace('+00:00', 'Z')
try:
pubDate = datetime.strptime(published, "%Y-%m-%dT%H:%M:%S+00:00")
pubDate = datetime.strptime(published, "%Y-%m-%dT%H:%M:%SZ")
except BaseException:
continue
rssStr += '<item>\n'