From 62ae03cd3baea2a1125fd45e55c8ed9f7d3d0576 Mon Sep 17 00:00:00 2001 From: Uriel Date: Wed, 11 Jun 2008 20:09:41 +0200 Subject: [PATCH] More correctly follow the rss spec, and use mtime for lastBuildDate and the post date for pubDate instead. --- bin/controller.rc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/controller.rc b/bin/controller.rc index 8940b14..57638c3 100755 --- a/bin/controller.rc +++ b/bin/controller.rc @@ -207,8 +207,9 @@ fn statpost { f = $1 uri = `{echo $f | sed 's,^'$sitedir',,'} title=`{basename $f | sed 's/^[0-9\-]*_(.*)\.md$/\1/; s/_/ /g' } + date=`{/bin/date -Rd `{basename $f |sed 's/(^[0-9\-]*).*/\1/; s/-[0-9]$//'}} stat=`{stat -c '%Y %U' $f} - date=`{/bin/date -Rd @$stat(1)} + mdate=`{/bin/date -Rd @$stat(1)} uri=$baseuri^`{cleanname `{echo -n $uri | sed 's/\.(md|tpl)//g'}} by=$stat(2) ifs=() { @@ -246,6 +247,7 @@ Content-Type: text/xml; charset=utf-8 %($uri%) %($uri%) %($date%) + %($mdate%) %($summary%)]]> % }