Fixed #26653 -- Made SyndicationFeed.latest_post_date() return time in UTC.

This commit is contained in:
Ketan Bhatt 2016-05-24 22:20:20 +05:30 committed by Tim Graham
parent 92107522ed
commit f31fbbae1a
4 changed files with 24 additions and 7 deletions

View file

@ -397,7 +397,12 @@ https://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004
Returns the latest ``pubdate`` or ``updateddate`` for all items in the
feed. If no items have either of these attributes this returns the
current date/time.
current UTC date/time.
.. versionchanged:: 1.11
In older versions, it returned the current date/time without any
timezone information.
``Enclosure``
-------------

View file

@ -207,7 +207,11 @@ Database backend API
Miscellaneous
-------------
* ...
* If no items in the feed have a ``pubdate`` or ``updateddate`` attribute,
:meth:`SyndicationFeed.latest_post_date()
<django.utils.feedgenerator.SyndicationFeed.latest_post_date>` now returns
the current UTC date/time, instead of a datetime without any timezone
information.
.. _deprecated-features-1.11: