Git development
 help / color / mirror / Atom feed
* [PATCH] git-svn - return original format_svn_date semantics
@ 2009-02-28  3:11 Ben Walton
  2009-02-28  3:22 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Walton @ 2009-02-28  3:11 UTC (permalink / raw)
  To: normalperson; +Cc: git, Ben Walton

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>
---
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index d967594..55702d0 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]);
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-28  3:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-28  3:11 [PATCH] git-svn - return original format_svn_date semantics Ben Walton
2009-02-28  3:22 ` Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox