Use RFC2822-compliant dateCreated in opml files (bug 227)

opml.py: Use email.Utils' formatdate function to generate a timestamp instead
	of using datetime. It is guaranteed to be RFC2822-compliant.

Thanks to Cory Albrecht for reporting this bug.
This commit is contained in:
nikosapi 2008-10-22 23:14:12 -04:00 committed by Thomas Perl
parent 644bfe987a
commit 8e34554146

View file

@ -49,7 +49,7 @@ import urllib2
import os.path
import os
import datetime
from email.Utils import formatdate
import gpodder
@ -189,7 +189,7 @@ class Exporter(object):
head = doc.createElement( 'head')
head.appendChild( self.create_node( doc, 'title', 'gPodder subscriptions'))
head.appendChild( self.create_node( doc, 'dateCreated', datetime.datetime.now().ctime()))
head.appendChild( self.create_node( doc, 'dateCreated', formatdate(localtime=True)))
opml.appendChild( head)
body = doc.createElement( 'body')