summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b4657e7)
raw | patch | inline | side by side (parent: b4657e7)
author | Jakub Narebski <jnareb@gmail.com> | |
Mon, 28 Aug 2006 21:17:31 +0000 (23:17 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 28 Aug 2006 23:44:14 +0000 (16:44 -0700) |
Add local time (hours and minutes) and local timezone to the output of
git_print_authorship command, used by git_commitdiff. The code was
taken from git_commit subroutine.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git_print_authorship command, used by git_commitdiff. The code was
taken from git_commit subroutine.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 1b352cbb25c525159d06a3c1c2e67f7524a02ff3..9324d71ebe4e01a8f9985a32990acc94636008f9 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
sub git_print_authorship {
my $co = shift;
- my %ad = parse_date($co->{'author_epoch'});
+ my %ad = parse_date($co->{'author_epoch'}, $co->{'author_tz'});
print "<div class=\"author_date\">" .
esc_html($co->{'author_name'}) .
- " [$ad{'rfc2822'}]</div>\n";
+ " [$ad{'rfc2822'}";
+ if ($ad{'hour_local'} < 6) {
+ printf(" (<span class=\"atnight\">%02d:%02d</span> %s)",
+ $ad{'hour_local'}, $ad{'minute_local'}, $ad{'tz_local'});
+ } else {
+ printf(" (%02d:%02d %s)",
+ $ad{'hour_local'}, $ad{'minute_local'}, $ad{'tz_local'});
+ }
+ print "]</div>\n";
}
sub git_print_page_path {