]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: rss channel date
authorGiuseppe Bilotta <redacted>
Mon, 26 Jan 2009 11:50:14 +0000 (12:50 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:38 +0000 (00:50 -0400)
The RSS 2.0 specifications defines not one but _two_ dates for its
channel element! Woohoo! Luckily, it seems that consensus seems to be
that if both are present they should be equal, except for some very
obscure and discouraged cases. Since lastBuildDate would make more sense
for us and pubDate seems to be the most commonly used, we defined both
and make them equal.

Signed-off-by: Giuseppe Bilotta <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index c8d8c7593e5bb45881f54c318421c71c6237314952e0c71e24b09b5d153c0df1..ef5e5dc099765b8a19363377bce6ee8b5ecbf093d8042f0af634861f74362845 100755 (executable)
@@ -6088,6 +6088,10 @@ XML
                              "<link>$alt_url</link>\n" .
                              "</image>\n";
                }
+               if (%latest_date) {
+                       print "<pubDate>$latest_date{'rfc2822'}</pubDate>\n";
+                       print "<lastBuildDate>$latest_date{'rfc2822'}</lastBuildDate>\n";
+               }
                print "<generator>gitweb v.$version/$git_version</generator>\n";
        } elsif ($format eq 'atom') {
                print <<XML;
This page took 0.252978 seconds and 4 git commands to generate.