summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorBen Walton <bwalton@artsci.utoronto.ca>2009-02-27 22:11:45 -0500
committerJunio C Hamano <gitster@pobox.com>2009-02-27 21:53:43 -0800
commit736e619a1be92fcb6eac0155b51bc93d1dcc3157 (patch)
treedb0d08e0ed6472fdd75708d17607e40cf2d5bf3d /git-svn.perl
parent48679e5c2d059b9b198d6f414dd80aa921d23002 (diff)
downloadgit-736e619a1be92fcb6eac0155b51bc93d1dcc3157.tar.gz
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>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index a676a4c78e..959eb52f3f 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -4738,7 +4738,7 @@ sub run_pager {
sub format_svn_date {
# some systmes don't handle or mishandle %z, so be creative.
- my $t = shift;
+ my $t = shift || time;
my $gm = timelocal(gmtime($t));
my $sign = qw( + + - )[ $t <=> $gm ];
my $gmoff = sprintf("%s%02d%02d", $sign, (gmtime(abs($t - $gm)))[2,1]);