diff --git a/newswire.py b/newswire.py index e31a7ad65..1eec3c41a 100644 --- a/newswire.py +++ b/newswire.py @@ -316,7 +316,8 @@ def parse_feed_date(pub_date: str, unique_string_identifier: str) -> str: "%a, %d %b %Y %H:%M:%S HST", "%a, %d %b %Y %H:%M:%S UT", "%Y-%m-%dT%H:%M:%S%z", - "%Y-%m-%dT%H:%M:%S%Z") + "%Y-%m-%dT%H:%M:%S%Z", + "%a, %d %b %Y %H:%M:%S") published_date = None for date_format in formats: if ',' in pub_date and ',' not in date_format: diff --git a/tests.py b/tests.py index d0d1efac5..d66ac9803 100644 --- a/tests.py +++ b/tests.py @@ -5141,6 +5141,11 @@ def _test_parse_newswire_feed_date(): assert published_date != "2020-11-22 00:00:00+00:00" assert "2020-11-22 00:" in published_date + pub_date = "Sun, 08 Jun 2025 00:50:05" + published_date = parse_feed_date(pub_date, unique_string_identifier) + assert published_date != "2025-06-08 00:50:05" + assert "2025-06-08 00:50:05+00:00" in published_date + def _test_valid_nick(): print('test_valid_nickname')