Browse Source

git svn fetch: Create correct commit timestamp when using --localtime

In parse_svn_date() prepend the correct UTC offset to the timestamp
returned.  This is the offset in effect at the commit time instead of
the offset in effect at calling time.

Signed-off-by: Urs Thuermann <urs@isnogud.escape.de>
Reviewed-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Urs Thuermann 8 years ago committed by Junio C Hamano
parent
commit
1adc4b9a58
  1. 2
      perl/Git/SVN.pm

2
perl/Git/SVN.pm

@ -1416,7 +1416,7 @@ sub parse_svn_date { @@ -1416,7 +1416,7 @@ sub parse_svn_date {
delete $ENV{TZ};
}

my $our_TZ = get_tz_offset();
my $our_TZ = get_tz_offset($epoch_in_UTC);

# This converts $epoch_in_UTC into our local timezone.
my ($sec, $min, $hour, $mday, $mon, $year,

Loading…
Cancel
Save