Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
Diffstat (limited to 'perl')
-rw-r--r--perl/Git.pm4
-rw-r--r--perl/Git/SVN.pm2
2 files changed, 4 insertions, 2 deletions
diff --git a/perl/Git.pm b/perl/Git.pm
index 9d60d7948b..a7440a1f09 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -534,7 +534,9 @@ If TIME is not supplied, the current local time is used.
sub get_tz_offset {
# some systems don't handle or mishandle %z, so be creative.
my $t = shift || time;
- my $gm = timegm(localtime($t));
+ my @t = localtime($t);
+ $t[5] += 1900;
+ my $gm = timegm(@t);
my $sign = qw( + + - )[ $gm <=> $t ];
return sprintf("%s%02d%02d", $sign, (gmtime(abs($t - $gm)))[2,1]);
}
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index bc4eed3d75..991a5885e9 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -1405,7 +1405,7 @@ sub parse_svn_date {
$ENV{TZ} = 'UTC';
my $epoch_in_UTC =
- Time::Local::timelocal($S, $M, $H, $d, $m - 1, $Y - 1900);
+ Time::Local::timelocal($S, $M, $H, $d, $m - 1, $Y);
# Determine our local timezone (including DST) at the
# time of $epoch_in_UTC. $Git::SVN::Log::TZ stored the