Skip to content

Commit 736e619

Browse files
Ben Waltongitster
authored andcommitted
git-svn - return original format_svn_date semantics
When %z was removed from the strftime call and subsituted with a local gmt offset calculation, time() was no longer the default for all time functions as it was with the previous localtime(shift). This is now corrected so that format_svn_time behaves as it used to. Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 48679e5 commit 736e619

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

git-svn.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4738,7 +4738,7 @@ sub run_pager {
47384738

47394739
sub format_svn_date {
47404740
# some systmes don't handle or mishandle %z, so be creative.
4741-
my $t = shift;
4741+
my $t = shift || time;
47424742
my $gm = timelocal(gmtime($t));
47434743
my $sign = qw( + + - )[ $t <=> $gm ];
47444744
my $gmoff = sprintf("%s%02d%02d", $sign, (gmtime(abs($t - $gm)))[2,1]);

0 commit comments

Comments
 (0)