git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-svn - return original format_svn_date semantics

From
Ben Walton <bwalton@artsci.utoronto.ca>
Date
Feb 28, 2009, 03:11 UTC
Message-ID
<1235790705-12903-1-git-send-email-bwalton@artsci.utoronto.ca>

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
Next: Eric Wong
Message 1 of 2 in “git-svn - return original format_svn_date semantics”
  1. git-svn - return original format_svn_date semanticsBen Walton, Feb 28, 2009
  2. Eric WongFeb 28, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.