forked from indymedia/epicyon
Check that offset exists
This commit is contained in:
1 parent
758380dade
commit
a998c0b321
1 file changed
+2
-1
+2
-1
@@ -191,7 +191,8 @@ def parseFeedDate(pubDate: str) -> str:
|
||||
pubDateStr = None
|
||||
if publishedDate:
|
||||
offset = publishedDate.utcoffset()
|
||||
publishedDate = publishedDate - offset
|
||||
if offset:
|
||||
publishedDate = publishedDate - offset
|
||||
# convert local date to UTC
|
||||
publishedDate = publishedDate.replace(tzinfo=timezone.utc)
|
||||
pubDateStr = str(publishedDate)
|
||||
|
||||
Reference in new issue
Block a user