@matheusbsbs / matheus-bagliano / commits / 6368d9f1af
Fork 0

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 <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jakub Narebski committed Mar 19, 2011 at 23:53 UTC 6368d9f1af7a5d4c8af2f11ffdb6af577f1e98f5
1 file changed +2 -3
gitweb/gitweb.perl
+2 -3
@@ -4906,7 +4906,6 @@ sub git_log_body {
4906 next if !%co;
4907 my $commit = $co{'id'};
4908 my $ref = format_ref_marker($refs, $commit);
4909 - my %ad = parse_date($co{'author_epoch'});
4909 git_print_header_div('commit',
4910 "<span class=\"age\">$co{'age_string'}</span>" .
4911 esc_html($co{'title'}) . $ref,
@@ -7064,7 +7063,7 @@ sub git_feed {
7063 if (defined($commitlist[0])) {
7064 %latest_commit = %{$commitlist[0]};
7065 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'});
7067 my $if_modified = $cgi->http('IF_MODIFIED_SINCE');
7068 if (defined $if_modified) {
7069 my $since;
@@ -7195,7 +7194,7 @@ XML
7194 if (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) {
7195 last;
7196 }
7198 - my %cd = parse_date($co{'author_epoch'});
7197 + my %cd = parse_date($co{'author_epoch'}, $co{'author_tz'});
7198
7199 # get list of changed files
7200 open my $fd, "-|", git_cmd(), "diff-tree", '-r', @diff_opts,