Ticket #4076: django-svn-feedgenerator-timezone.patch

File django-svn-feedgenerator-timezone.patch, 619 bytes (added by Alastair Tse <alastair@…>, 8 years ago)
  • django/utils/feedgenerator.py

     
    2626    return email.Utils.formatdate(time.mktime(date.timetuple()))
    2727
    2828def rfc3339_date(date):
    29     return date.strftime('%Y-%m-%dT%H:%M:%SZ')
     29    if date.tzinfo:
     30        return date.strftime('%Y-%m-%dT%H:%M:%S%z')
     31    else:
     32        return date.strftime('%Y-%m-%dT%H:%M:%SZ')
    3033
    3134def get_tag_uri(url, date):
    3235    "Creates a TagURI. See http://diveintomark.org/archives/2004/05/28/howto-atom-id"
Back to Top