What steps will reproduce the problem?
1. set locale to de-DE
2. generate rss2 feed with 1 item with any pubDate
3. try to display the feed with e.g. firefox
What is the expected output? What do you see instead?
expected: RFC822 date
actual: date string with localised month and weekday names
Proposed patch:
from datetime import datetime
from email.util import formatdate
in _format_datetime:
# Then, convert that to the appropriate string
if feed_type is "rss2":
return formatdate(mktime(time))
elif feed_type is "atom":
return datetime.utcfromtimestamp(mktime(time)).isoformat()