mirror of https://gitlab.com/bashrc2/epicyon
Showing warning about date format
parent
a1901609bf
commit
a8ac86b758
|
@ -220,8 +220,6 @@ def parseFeedDate(pubDate: str) -> str:
|
||||||
publishedDate = \
|
publishedDate = \
|
||||||
datetime.strptime(pubDate, dateFormat)
|
datetime.strptime(pubDate, dateFormat)
|
||||||
except BaseException:
|
except BaseException:
|
||||||
print('WARN: unrecognized date format: ' +
|
|
||||||
pubDate + ' ' + dateFormat)
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if publishedDate:
|
if publishedDate:
|
||||||
|
@ -240,6 +238,8 @@ def parseFeedDate(pubDate: str) -> str:
|
||||||
pubDateStr = str(publishedDate)
|
pubDateStr = str(publishedDate)
|
||||||
if not pubDateStr.endswith('+00:00'):
|
if not pubDateStr.endswith('+00:00'):
|
||||||
pubDateStr += '+00:00'
|
pubDateStr += '+00:00'
|
||||||
|
else:
|
||||||
|
print('WARN: unrecognized date format: ' + pubDate)
|
||||||
|
|
||||||
return pubDateStr
|
return pubDateStr
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue