diff options
-rw-r--r-- | lib/util.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/util.py b/lib/util.py index ac1c904..fbddb2e 100644 --- a/lib/util.py +++ b/lib/util.py @@ -153,7 +153,9 @@ def generate_rss(request, books): # pubDate descending, day decremented w/ each iteration pub_date = ET.SubElement(item, 'pubDate') - pub_date.text = (date(2000, 12, 31) - timedelta(days=idx)).ctime() + pub_format = '%a, %d %b %Y %H:%M:%S %z' + pub_date.text = (date(2000, 12, 31) - timedelta(days=idx)).strftime( + pub_format) enc_attr = { 'url': '{}?a={}&f={}'.format(request.base_url, book, f), 'length': str(books[book]['files'][f]['size_bytes']), |