diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2025-02-20 21:51:12 +0100 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2025-02-20 21:51:12 +0100 |
commit | 2a81482dd6d2a17a253e83becc6a042010680c9d (patch) | |
tree | 78251f5a591913ae265edd53dad6de3af55785fc /makesite.pl | |
parent | 84f18d0877ce89aa106b79205a35c191e8e21eea (diff) |
rss feed: pass w3c validation service
Diffstat (limited to 'makesite.pl')
-rwxr-xr-x | makesite.pl | 6 |
1 files changed, 3 insertions, 3 deletions
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/; |