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).
This commit is contained in:
parent
5180015051
commit
2ac7cd52b4
|
@ -26,7 +26,6 @@ import email
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
from django.utils import datetime_safe
|
|
||||||
from django.utils.encoding import iri_to_uri
|
from django.utils.encoding import iri_to_uri
|
||||||
from django.utils.timezone import utc
|
from django.utils.timezone import utc
|
||||||
from django.utils.xmlutils import SimplerXMLGenerator
|
from django.utils.xmlutils import SimplerXMLGenerator
|
||||||
|
@ -53,7 +52,7 @@ def get_tag_uri(url, date):
|
||||||
bits = urlparse(url)
|
bits = urlparse(url)
|
||||||
d = ''
|
d = ''
|
||||||
if date is not None:
|
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)
|
return 'tag:%s%s:%s/%s' % (bits.hostname, d, bits.path, bits.fragment)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue