summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-03-06 14:54:08 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-03-06 14:54:08 -0800
commit179e1f53b8a8ce4ea756e644fc1da0006d8f0c25 (patch)
tree997bfbc5ad35898edcdc42464c2245f992678e7c /contrib
parentMerge branch 'jk/strbuf-read-file-close-error' (diff)
parentperl: call timegm and timelocal with 4-digit year (diff)
downloadtgif-179e1f53b8a8ce4ea756e644fc1da0006d8f0c25.tar.xz
Merge branch 'bw/perl-timegm-timelocal-fix'
Y2k20 fix ;-) for our perl scripts. * bw/perl-timegm-timelocal-fix: perl: call timegm and timelocal with 4-digit year
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/examples/git-svnimport.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/examples/git-svnimport.perl b/contrib/examples/git-svnimport.perl
index c414f0d9c7..75a43e23b6 100755
--- a/contrib/examples/git-svnimport.perl
+++ b/contrib/examples/git-svnimport.perl
@@ -238,7 +238,7 @@ sub pdate($) {
my($d) = @_;
$d =~ m#(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)#
or die "Unparseable date: $d\n";
- my $y=$1; $y-=1900 if $y>1900;
+ my $y=$1; $y+=1900 if $y<1000;
return timegm($6||0,$5,$4,$3,$2-1,$y);
}