Skip to content

Commit 6368d9f

Browse files
jnarebgitster
authored andcommitted
gitweb: Always call parse_date with timezone parameter
Timezone is required to correctly set local time, which would be needed for future 'localtime' feature. While at it, remove unnecessary call to the function from git_log_body, as its return value is not used anywhere. Signed-off-by: Jakub Narebski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 958bf6b commit 6368d9f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

gitweb/gitweb.perl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4906,7 +4906,6 @@ sub git_log_body {
49064906
next if !%co;
49074907
my $commit = $co{'id'};
49084908
my $ref = format_ref_marker($refs, $commit);
4909-
my %ad = parse_date($co{'author_epoch'});
49104909
git_print_header_div('commit',
49114910
"<span class=\"age\">$co{'age_string'}</span>" .
49124911
esc_html($co{'title'}) . $ref,
@@ -7064,7 +7063,7 @@ sub git_feed {
70647063
if (defined($commitlist[0])) {
70657064
%latest_commit = %{$commitlist[0]};
70667065
my $latest_epoch = $latest_commit{'committer_epoch'};
7067-
%latest_date = parse_date($latest_epoch);
7066+
%latest_date = parse_date($latest_epoch, $latest_commit{'comitter_tz'});
70687067
my $if_modified = $cgi->http('IF_MODIFIED_SINCE');
70697068
if (defined $if_modified) {
70707069
my $since;
@@ -7195,7 +7194,7 @@ sub git_feed {
71957194
if (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) {
71967195
last;
71977196
}
7198-
my %cd = parse_date($co{'author_epoch'});
7197+
my %cd = parse_date($co{'author_epoch'}, $co{'author_tz'});
71997198

72007199
# get list of changed files
72017200
open my $fd, "-|", git_cmd(), "diff-tree", '-r', @diff_opts,

0 commit comments

Comments
 (0)