Date format

main
Bob Mottram 2020-10-04 23:16:00 +01:00
parent a5291d4106
commit aa1e481b10
1 changed files with 2 additions and 1 deletions

View File

@ -145,7 +145,8 @@ def getRSSfromDict(baseDir: str, newswire: {},
None, domainFull, None, domainFull,
'Newswire', translate) 'Newswire', translate)
for published, fields in newswire.items(): for published, fields in newswire.items():
published = published.replace('+00:00', 'Z') published = published.replace('+00:00', 'Z').strip()
published = published.replace(' ', 'T')
try: try:
pubDate = datetime.strptime(published, "%Y-%m-%dT%H:%M:%SZ") pubDate = datetime.strptime(published, "%Y-%m-%dT%H:%M:%SZ")
except BaseException: except BaseException: