mirror of https://gitlab.com/bashrc2/epicyon
Check that offset exists
parent
758380dade
commit
a998c0b321
|
@ -191,7 +191,8 @@ def parseFeedDate(pubDate: str) -> str:
|
||||||
pubDateStr = None
|
pubDateStr = None
|
||||||
if publishedDate:
|
if publishedDate:
|
||||||
offset = publishedDate.utcoffset()
|
offset = publishedDate.utcoffset()
|
||||||
publishedDate = publishedDate - offset
|
if offset:
|
||||||
|
publishedDate = publishedDate - offset
|
||||||
# convert local date to UTC
|
# convert local date to UTC
|
||||||
publishedDate = publishedDate.replace(tzinfo=timezone.utc)
|
publishedDate = publishedDate.replace(tzinfo=timezone.utc)
|
||||||
pubDateStr = str(publishedDate)
|
pubDateStr = str(publishedDate)
|
||||||
|
|
Loading…
Reference in New Issue