Calculate offset

main
Bob Mottram 2020-11-22 20:33:24 +00:00
parent 3812131758
commit 758380dade
1 changed files with 2 additions and 1 deletions

View File

@ -190,7 +190,8 @@ def parseFeedDate(pubDate: str) -> str:
pubDateStr = None
if publishedDate:
publishedDate = publishedDate - publishedDate.utcoffset()
offset = publishedDate.utcoffset()
publishedDate = publishedDate - offset
# convert local date to UTC
publishedDate = publishedDate.replace(tzinfo=timezone.utc)
pubDateStr = str(publishedDate)