1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-07 11:56:10 +02:00

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>
This commit is contained in:
Ben Walton 2009-02-27 22:11:45 -05:00 committed by Junio C Hamano
parent 48679e5c2d
commit 736e619a1b

View File

@ -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]);