From bea0b1da510b39f156a7472a3790c8e4fce5d87c Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Mon, 10 Dec 2012 15:32:31 -0800 Subject: [PATCH] Fixing dateutil on broken dates. --- utils/story_functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/story_functions.py b/utils/story_functions.py index 8a634d894..5f79126d7 100644 --- a/utils/story_functions.py +++ b/utils/story_functions.py @@ -74,7 +74,7 @@ def pre_process_story(entry): publish_date = datetime.datetime(*publish_date[:6]) if not publish_date and entry.get('published'): try: - publish_date = dateutil.parser.parse(entry.get('published')) + publish_date = dateutil.parser.parse(entry.get('published')).replace(tzinfo=None) except ValueError: pass