tgupdate: merge t/htmlcache/summary base into t/htmlcache/summary
[git/gitweb.git] / gitweb / gitweb.perl
index 26ebb0a..ad0d723 100755 (executable)
@@ -3897,7 +3897,7 @@ sub parse_activity_date {
        }
        if ($dstr =~ /^\s*(\d{4})-(\d{2})-(\d{2})[Tt _](\d{1,2}):(\d{2}):(\d{2})(?:[ _]?([Zz]|(?:[-+]\d{1,2}:?\d{2})))?\s*$/) {
                my ($Y,$m,$d,$H,$M,$S,$z) = ($1,$2,$3,$4,$5,$6,$7||'');
-               my $seconds = timegm(0+$S, 0+$M, 0+$H, 0+$d, $m-1, $Y-1900);
+               my $seconds = timegm(0+$S, 0+$M, 0+$H, 0+$d, $m-1, 0+$Y);
                defined($z) && $z ne '' or $z = 'Z';
                $z =~ s/://;
                substr($z,1,0) = '0' if length($z) == 4;
@@ -4061,7 +4061,8 @@ sub parse_file_date {
        my $file = shift;
        my $mtime = (stat("$projectroot/$project/$file"))[9];
        return () unless defined $mtime;
-       my $tzoffset = timegm((localtime($mtime))[0..5]) - $mtime;
+       my ($sec,$min,$hour,$mday,$mon,$year) = localtime($mtime);
+       my $tzoffset = timegm($sec,$min,$hour,$mday,$mon,$year+1900) - $mtime;
        my $tzstring = '+';
        if ($tzoffset <= 0) {
                $tzstring = '-';