From 6090fac39fc892967847eb4722808d5aa4f73df2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 29 Feb 2020 09:59:50 +0000 Subject: [PATCH] Add publication date to rss --- blog.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blog.py b/blog.py index 3ace81939..759865b3a 100644 --- a/blog.py +++ b/blog.py @@ -260,10 +260,13 @@ def htmlBlogPostRSS(authorized: bool, \ if not restrictToDomain or \ (restrictToDomain and '/'+domain in messageLink): if postJsonObject['object'].get('summary'): + published=postJsonObject['object']['published'] + pubDate=datetime.strptime(published,"%Y-%m-%dT%H:%M:%SZ") titleStr=postJsonObject['object']['summary'] rssStr= ' ' rssStr+=' '+titleStr+'' rssStr+=' '+messageLink+'' + rssStr+=' '+pubDate.strftime("%D, %d %M %Y %H:%M:%S Z")+'' rssStr+=' ' return rssStr