From 50eae99c1991295a4e32facea456d17e3c6a2c6c Mon Sep 17 00:00:00 2001 From: Jordan Date: Tue, 1 Sep 2020 14:22:16 -0700 Subject: satisfy RFC822 (XML pubDate) --- lib/util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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']), -- cgit v1.2.3-54-g00ecf