diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-03-06 22:54:08 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-06 22:54:08 (GMT) |
commit | 179e1f53b8a8ce4ea756e644fc1da0006d8f0c25 (patch) | |
tree | 997bfbc5ad35898edcdc42464c2245f992678e7c /contrib | |
parent | 6c3e6f6fcbdd12c70a849e4e1be57d82edb8f14f (diff) | |
parent | a40e06ee336d608cfe0928d91d2b44112d8fd1e2 (diff) | |
download | git-179e1f53b8a8ce4ea756e644fc1da0006d8f0c25.zip git-179e1f53b8a8ce4ea756e644fc1da0006d8f0c25.tar.gz git-179e1f53b8a8ce4ea756e644fc1da0006d8f0c25.tar.bz2 |
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-x | contrib/examples/git-svnimport.perl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/examples/git-svnimport.perl b/contrib/examples/git-svnimport.perl index c414f0d..75a43e2 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); } |