Code

Ticket #9957: feeds_timezone_check.diff

File feeds_timezone_check.diff, 521 bytes (added by urajat, 5 years ago)
Line 
1Index: django/contrib/syndication/feeds.py
2===================================================================
3--- django/contrib/syndication/feeds.py (revision 9699)
4+++ django/contrib/syndication/feeds.py (working copy)
5@@ -144,7 +144,7 @@
6                 author_email = author_link = None
7 
8             pubdate = self.__get_dynamic_attr('item_pubdate', item)
9-            if pubdate:
10+            if pubdate and not pubdate.tzinfo:
11                 now = datetime.now()
12                 utcnow = datetime.utcnow()
13