From a1901609bfd08284a965adf3cebec1bc18966a70 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 7 Sep 2021 20:09:41 +0100 Subject: [PATCH] date format --- newswire.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/newswire.py b/newswire.py index 15ca99516..2aae4b087 100644 --- a/newswire.py +++ b/newswire.py @@ -192,9 +192,9 @@ def parseFeedDate(pubDate: str) -> str: formats = ("%a, %d %b %Y %H:%M:%S %z", "%a, %d %b %Y %H:%M:%S EST", "%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:%S%z") - publishedDate = None for dateFormat in formats: if ',' in pubDate and ',' not in dateFormat: @@ -207,6 +207,8 @@ def parseFeedDate(pubDate: str) -> str: continue if 'EST' not in pubDate and 'EST' in dateFormat: continue + if 'GMT' not in pubDate and 'GMT' in dateFormat: + continue if 'EST' in pubDate and 'EST' not in dateFormat: continue if 'UT' not in pubDate and 'UT' in dateFormat: