mirror of https://gitlab.com/bashrc2/epicyon
date format
parent
a79d2b191d
commit
a1901609bf
|
@ -192,9 +192,9 @@ def parseFeedDate(pubDate: str) -> str:
|
||||||
formats = ("%a, %d %b %Y %H:%M:%S %z",
|
formats = ("%a, %d %b %Y %H:%M:%S %z",
|
||||||
"%a, %d %b %Y %H:%M:%S EST",
|
"%a, %d %b %Y %H:%M:%S EST",
|
||||||
"%a, %d %b %Y %H:%M:%S UT",
|
"%a, %d %b %Y %H:%M:%S UT",
|
||||||
|
"%a, %d %b %Y %H:%M:%S GMT",
|
||||||
"%Y-%m-%dT%H:%M:%SZ",
|
"%Y-%m-%dT%H:%M:%SZ",
|
||||||
"%Y-%m-%dT%H:%M:%S%z")
|
"%Y-%m-%dT%H:%M:%S%z")
|
||||||
|
|
||||||
publishedDate = None
|
publishedDate = None
|
||||||
for dateFormat in formats:
|
for dateFormat in formats:
|
||||||
if ',' in pubDate and ',' not in dateFormat:
|
if ',' in pubDate and ',' not in dateFormat:
|
||||||
|
@ -207,6 +207,8 @@ def parseFeedDate(pubDate: str) -> str:
|
||||||
continue
|
continue
|
||||||
if 'EST' not in pubDate and 'EST' in dateFormat:
|
if 'EST' not in pubDate and 'EST' in dateFormat:
|
||||||
continue
|
continue
|
||||||
|
if 'GMT' not in pubDate and 'GMT' in dateFormat:
|
||||||
|
continue
|
||||||
if 'EST' in pubDate and 'EST' not in dateFormat:
|
if 'EST' in pubDate and 'EST' not in dateFormat:
|
||||||
continue
|
continue
|
||||||
if 'UT' not in pubDate and 'UT' in dateFormat:
|
if 'UT' not in pubDate and 'UT' in dateFormat:
|
||||||
|
|
Loading…
Reference in New Issue