diff options
| author | Tim Graham <timograham@gmail.com> | 2018-07-26 16:49:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-26 16:49:15 -0400 |
| commit | 2ac7cd52b466e5090c0479de02c4765b4c483fa3 (patch) | |
| tree | 992e0cef8c25fa7c870c16e53dedf373b23e6d0f | |
| parent | 5180015051f262b73559bb55a8e3fe6f551f8b68 (diff) | |
Refs #29600 -- Removed datetime_safe usage in feedgenerator.
The only effect would be if items in Atom feeds had a published date
year of < 1000 (ensuring those years are padded with leading zeros).
| -rw-r--r-- | django/utils/feedgenerator.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py index e49f534a19..f0123b3702 100644 --- a/django/utils/feedgenerator.py +++ b/django/utils/feedgenerator.py @@ -26,7 +26,6 @@ import email from io import StringIO from urllib.parse import urlparse -from django.utils import datetime_safe from django.utils.encoding import iri_to_uri from django.utils.timezone import utc from django.utils.xmlutils import SimplerXMLGenerator @@ -53,7 +52,7 @@ def get_tag_uri(url, date): bits = urlparse(url) d = '' if date is not None: - d = ',%s' % datetime_safe.new_datetime(date).strftime('%Y-%m-%d') + d = ',%s' % date.strftime('%Y-%m-%d') return 'tag:%s%s:%s/%s' % (bits.hostname, d, bits.path, bits.fragment) |
