From 2a81482dd6d2a17a253e83becc6a042010680c9d Mon Sep 17 00:00:00 2001 From: Vincent Douillet Date: Thu, 20 Feb 2025 21:51:12 +0100 Subject: rss feed: pass w3c validation service --- makesite.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'makesite.pl') diff --git a/makesite.pl b/makesite.pl index fa55cf8..77ab6f1 100755 --- a/makesite.pl +++ b/makesite.pl @@ -110,8 +110,8 @@ open my $outHandle, ">", "output/rss.xml"; # Write channel info and insert publication and build dates open my $inHandle, "<", "template/rss.xml"; my $pubDate = Time::Piece->strptime($articleList[$#articleList]{date}, "%m-%d-%Y"); # Last article date -$pubDate = $pubDate->strftime(); -my $buildDate = gmtime->strftime(); # Current date +$pubDate = $pubDate->strftime("%a, %d %b %Y %H:%M:%S %z"); +my $buildDate = gmtime->strftime("%a, %d %b %Y %H:%M:%S %z"); # Current date while(<$inHandle>) { $_ =~ s/\$link/$BASE_URL/; $_ =~ s/\$pubDate/$pubDate/; @@ -123,7 +123,7 @@ for(my $i = $#articleList; $i >= 0; $i--) { open my $inHandle, "<", "template/rss-item.xml"; my $url = $BASE_URL . $articleList[$i]{address}; my $pubDate = Time::Piece->strptime($articleList[$i]{date}, "%m-%d-%Y"); - $pubDate = $pubDate->strftime(); + $pubDate = $pubDate->strftime("%a, %d %b %Y %H:%M:%S %z"); while(<$inHandle>) { $_ =~ s/\$title/$articleList[$i]{title}/; $_ =~ s/\$link/$url/; -- cgit v1.2.3