My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 6: date formatting breaks in non-US locale
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by a.u.r.e....@gmx.net, Jul 16, 2013
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()





Powered by Google Project Hosting