Bug#162588: www.debian.org: Patch
Package: www.debian.org
Version: N/A; reported 2003-03-08
Tags: patch
Followup-For: Bug #162588
The following patch should make the requested changes.
But someone has to decide if to add it.
Index: pages.pl
===================================================================
RCS file: /cvs/webwml/packages/htmlscripts/pages.pl,v
retrieving revision 1.9
diff -u -r1.9 pages.pl
--- pages.pl 30 Jan 2003 14:43:59 -0000 1.9
+++ pages.pl 8 Mar 2003 16:48:20 -0000
@@ -83,7 +83,7 @@
if(file_changed("$dest_dir/index.html", $index_page)) {
open(FILEH, ">$dest_dir/index.html") || die "Can\'t open file $d
est_dir/index.html: $!";
sysopen(FILEH, "$dest_dir/index.html", O_WRONLY | O_TRUNC | O_CR
EAT, 0664) || die "Can\'t open file $dest_dir/index.html: $!";
- $now_time = gmtime();
+ $now_time = time_stamp();
$index_page =~ s/LAST_MODIFIED_DATE/$now_time/;
print FILEH $index_page;
close FILEH;
@@ -120,7 +120,7 @@
if(file_changed("$dest_dir/allpackages.html", $all_package)) {
open(FILEH, ">$dest_dir/allpackages.html") || die "Can\'t open f
ile $dest_dir/allpackages.html: $!";
sysopen(FILEH, "$dest_dir/allpackages.html", O_WRONLY | O_TRUNC
| O_CREAT, 0664) || die "Can\'t open file $dest_dir/allpackages.html: $!";
- $now_time = gmtime();
+ $now_time = time_stamp();
$all_package =~ s/LAST_MODIFIED_DATE/$now_time/;
print FILEH $all_package;
close FILEH;
@@ -131,7 +131,7 @@
my ($dest_dir, $section) = @_;
my $res;
- $now_time = gmtime();
+ $now_time = time_stamp();
@htmldir = split /\//, $dest_dir; $distro = pop @htmldir;
$section_page = header("Software Packages in `$distro\', $section sectio
n", '../../..', '../../..');
if ($distro eq "experimental") {
@@ -415,4 +415,15 @@
print MD5H "$md5s{$_} $_\n";
}
close MD5H;
+}
+
+sub time_stamp() {
+ my ($sec,$min,$hour,$mday,undef,$year) = gmtime();
+ my $time_str = gmtime();
+ my ($wday, $month) = ($time_str =~ /^(\w{3})\s+(\w+)/);
+
+ $year += 1900;
+ $time_str = sprintf "$wday, $mday $month $year %02d:%02d:%02d +0000", $hour
, $min, $sec;
+
+ return $time_str;
}
-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux djpig 2.4.20 #1 Fri Mar 7 14:16:01 CET 2003 i686
Locale: LANG=de_DE, LC_CTYPE=de_DE
Reply to: