Commit 9f6ab810 authored by Jacob Kaplan-Moss's avatar Jacob Kaplan-Moss
Browse files

Fixed #8128: correctly handle feeds that incorrectly don't provide pubdates....

Fixed #8128: correctly handle feeds that incorrectly don't provide pubdates. Be liberal in what you accept!


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 1f6d3358
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@ class Feed(object):
                tzDifference = (now - utcnow)

            # Round the timezone offset to the nearest half hour.
            if pubdate:
                tzOffsetMinutes = sign * ((tzDifference.seconds / 60 + 15) / 30) * 30
                tzOffset = timedelta(minutes=tzOffsetMinutes)
                pubdate = pubdate.replace(tzinfo=FixedOffset(tzOffset))