feeds: add fallback for time parser

master
pictuga 2021-04-22 21:57:16 +02:00
parent 3a1d564992
commit e37c8346d0
1 changed files with 3 additions and 0 deletions

View File

@ -525,6 +525,9 @@ def parse_time(value):
elif isinstance(value, datetime):
time = value
else:
time = None
# add default time zone if none set
if time is not None and time.tzinfo is None:
time = time.replace(tzinfo=tz.tzutc())