Skip to content

Commit

Permalink
git svn fetch: Create correct commit timestamp when using --localtime
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Eric Wong <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
thuermann authored and gitster committed Aug 8, 2017
1 parent cf8899d commit 1adc4b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion perl/Git/SVN.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1adc4b9

Please sign in to comment.