{"thread":{"id":"18058","subject":"[PATCH] git-svn - return original format_svn_date semantics","startedAt":"2009-02-28T03:11:45Z","lastAt":"2009-02-28T03:22:19Z","messageCount":2,"participants":["Ben Walton","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"106505","messageId":"1235790705-12903-1-git-send-email-bwalton@artsci.utoronto.ca","threadId":"18058","inReplyTo":null,"subject":"[PATCH] git-svn - return original format_svn_date semantics","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2009-02-28T03:11:45Z","receivedAt":"2009-02-28T03:11:45Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"When %z was removed from the strftime call and subsituted with a\nlocal gmt offset calculation, time() was no longer the default for\nall time functions as it was with the previous localtime(shift).\nThis is now corrected so that format_svn_time behaves as it used to.\n\nSigned-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n---\n git-svn.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex d967594..55702d0 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -4738,7 +4738,7 @@ sub run_pager {\n \n sub format_svn_date {\n \t# some systmes don't handle or mishandle %z, so be creative.\n-\tmy $t = shift;\n+\tmy $t = shift || time;\n \tmy $gm = timelocal(gmtime($t));\n \tmy $sign = qw( + + - )[ $t <=> $gm ];\n \tmy $gmoff = sprintf(\"%s%02d%02d\", $sign, (gmtime(abs($t - $gm)))[2,1]);\n-- \n1.6.0.4\n"},{"id":"106506","messageId":"20090228032219.GA28606@dcvr.yhbt.net","threadId":"18058","inReplyTo":"1235790705-12903-1-git-send-email-bwalton@artsci.utoronto.ca","subject":"Re: [PATCH] git-svn - return original format_svn_date semantics","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-02-28T03:22:19Z","receivedAt":"2009-02-28T03:22:19Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Ben Walton <bwalton@artsci.utoronto.ca> wrote:\n> When %z was removed from the strftime call and subsituted with a\n> local gmt offset calculation, time() was no longer the default for\n> all time functions as it was with the previous localtime(shift).\n> This is now corrected so that format_svn_time behaves as it used to.\n> \n> Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n\nThanks Ben,\n\nI'm pretty sure there's another bug lurking in there with the \"info\"\ncommand, but this should at least cleanup the output as a stopgap\nmeasure until somebody has time to properly fix it.\n\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\n> ---\n>  git-svn.perl |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/git-svn.perl b/git-svn.perl\n> index d967594..55702d0 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -4738,7 +4738,7 @@ sub run_pager {\n>  \n>  sub format_svn_date {\n>  \t# some systmes don't handle or mishandle %z, so be creative.\n> -\tmy $t = shift;\n> +\tmy $t = shift || time;\n>  \tmy $gm = timelocal(gmtime($t));\n>  \tmy $sign = qw( + + - )[ $t <=> $gm ];\n>  \tmy $gmoff = sprintf(\"%s%02d%02d\", $sign, (gmtime(abs($t - $gm)))[2,1]);\n> -- \n> 1.6.0.4\n"}]}