From: Urs Thuermann Date: Sat, 5 Aug 2017 00:12:15 +0000 (+0200) Subject: git svn fetch: Create correct commit timestamp when using --localtime X-Git-Tag: v2.14.2~32^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1adc4b9a5886465adc71116b7ff2d5c320731e05;p=git 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 Reviewed-by: Eric Wong Signed-off-by: Junio C Hamano --- diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm index 98518f4ddb..bc4eed3d75 100644 --- a/perl/Git/SVN.pm +++ b/perl/Git/SVN.pm @@ -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,