summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 48679e5)
raw | patch | inline | side by side (parent: 48679e5)
author | Ben Walton <bwalton@artsci.utoronto.ca> | |
Sat, 28 Feb 2009 03:11:45 +0000 (22:11 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 28 Feb 2009 05:53:43 +0000 (21:53 -0800) |
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>
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>
git-svn.perl | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index a676a4c78e7e37d869ed0553117449b23c6eb611..959eb52f3fbe01c5f13eeb169549da98b0b9d64f 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
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]);