shithub: werc

Download patch

ref: 6f12e173a1dfd222b3dae4514cc477580454df26
parent: e285e79d3a71be672ad4541227dfc43b1feca840
author: <sl@stanleylieber.com>
date: Fri Jan 29 16:46:41 EST 2021

apps/blagh/rss20.tpl: print correct <pubDate> for each <item> (thanks, phil9)

--- a/apps/blagh/rss20.tpl
+++ b/apps/blagh/rss20.tpl
@@ -25,10 +25,10 @@
 	# rfc2822 last time channel content changed.
 	lbd=`{ndate -m `{date `{mtime `{ls $blagh_root$blagh_dirs/[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/[0-9] | tail -1} | awk '{print $1}'}}}
 	echo '<lastBuildDate>'$"lbd'</lastBuildDate>'
-	# rfc2822 publication date for content in the channel.
-	pubdate=`{ndate -m}
         for(f in `{get_post_list $blagh_root$blagh_dirs}){
             statpost $f
+	    # rfc2822 publication date for this post.
+	    pubdate=`{ndate -m `{date `{mtime $f | awk '{print $1}'}}}
 %}
         <item>
             <title><![CDATA[%($title%)]]></title>