summaryrefslogtreecommitdiffstats
path: root/perl/Git/SVN/Log.pm
diff options
context:
space:
mode:
authorBen Walton <bdwalton@gmail.com>2013-02-09 22:46:56 +0100
committerJunio C Hamano <gitster@pobox.com>2013-02-09 23:01:28 +0100
commit68868ff57348b7ae351890b3599949422d2e6001 (patch)
tree78b31a635b9a118c9e207f41e2dc2ef680ae109c /perl/Git/SVN/Log.pm
parentGit 1.8.1.3 (diff)
downloadgit-68868ff57348b7ae351890b3599949422d2e6001.tar.xz
git-68868ff57348b7ae351890b3599949422d2e6001.zip
Move Git::SVN::get_tz to Git::get_tz_offset
This function has utility outside of the SVN module for any routine that needs the equivalent of GNU strftime's %z formatting option. Move it to the top-level Git.pm so that non-SVN modules don't need to import the SVN module to use it. The rename makes the purpose of the function clearer. Signed-off-by: Ben Walton <bdwalton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r--perl/Git/SVN/Log.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl/Git/SVN/Log.pm b/perl/Git/SVN/Log.pm
index 3cc1c6f081..3f8350a57d 100644
--- a/perl/Git/SVN/Log.pm
+++ b/perl/Git/SVN/Log.pm
@@ -2,7 +2,11 @@ package Git::SVN::Log;
use strict;
use warnings;
use Git::SVN::Utils qw(fatal);
-use Git qw(command command_oneline command_output_pipe command_close_pipe);
+use Git qw(command
+ command_oneline
+ command_output_pipe
+ command_close_pipe
+ get_tz_offset);
use POSIX qw/strftime/;
use constant commit_log_separator => ('-' x 72) . "\n";
use vars qw/$TZ $limit $color $pager $non_recursive $verbose $oneline
@@ -119,7 +123,7 @@ sub run_pager {
sub format_svn_date {
my $t = shift || time;
require Git::SVN;
- my $gmoff = Git::SVN::get_tz($t);
+ my $gmoff = get_tz_offset($t);
return strftime("%Y-%m-%d %H:%M:%S $gmoff (%a, %d %b %Y)", localtime($t));
}