Fixed number #4076: django.utils.feedgenerator now corectly handles times without timezones. Thanks, Alastair Tse.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
27d027782c
commit
eb11615baa
|
@ -27,6 +27,9 @@ def rfc2822_date(date):
|
||||||
return email.Utils.formatdate(time.mktime(date.timetuple()))
|
return email.Utils.formatdate(time.mktime(date.timetuple()))
|
||||||
|
|
||||||
def rfc3339_date(date):
|
def rfc3339_date(date):
|
||||||
|
if date.tzinfo:
|
||||||
|
return date.strftime('%Y-%m-%dT%H:%M:%S%z')
|
||||||
|
else:
|
||||||
return date.strftime('%Y-%m-%dT%H:%M:%SZ')
|
return date.strftime('%Y-%m-%dT%H:%M:%SZ')
|
||||||
|
|
||||||
def get_tag_uri(url, date):
|
def get_tag_uri(url, date):
|
||||||
|
|
Loading…
Reference in New Issue