]> granicus.if.org Git - git/commitdiff
git svn fetch: Create correct commit timestamp when using --localtime
authorUrs Thuermann <urs@isnogud.escape.de>
Sat, 5 Aug 2017 00:12:15 +0000 (02:12 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Aug 2017 16:57:44 +0000 (09:57 -0700)
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>
perl/Git/SVN.pm

index 98518f4ddb4c031417e313dcf4daaa68e9955be0..bc4eed3d75461444f8af0e27e2930ccb25663312 100644 (file)
@@ -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,