Re: [PATCH -1/3] gitweb: Always call parse_date with timezone parameter
- From
Kevin Cernekee <cernekee@gmail.com>
- Date
- Mar 19, 2011, 22:56 UTC
- Message-ID
- <AANLkTimV7vvD0PTMejydiyW_CeUH0cuQ-2+PnRqjzob5@mail.gmail.com>
- In-Reply-To
- <201103192318.45925.jnareb@gmail.com>
On Sat, Mar 19, 2011 at 3:18 PM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 6 quoted lines
> @@ -4906,7 +4906,7 @@ sub git_log_body {
> next if !%co;
> my $commit = $co{'id'};
> my $ref = format_ref_marker($refs, $commit);
> - my %ad = parse_date($co{'author_epoch'});
> + my %ad = parse_date($co{'author_epoch'}, $co{'athor_tz'});Should be 'author_tz'
Looking at the master branch, I don't see %ad actually getting used anywhere? Maybe it is safe to delete the line entirely, since git_print_authorship() calls parse_date() itself.
Show 6 quoted lines
> @@ -7064,7 +7064,7 @@ sub git_feed {
> if (defined($commitlist[0])) {
> %latest_commit = %{$commitlist[0]};
> my $latest_epoch = $latest_commit{'committer_epoch'};
> - %latest_date = parse_date($latest_epoch);
> + %latest_date = parse_date($latest_epoch, $latest_commit{'comitter_tz'});Should be 'committer_tz'
I would agree that it isn't such a good thing for $latest_date{'rfc2822_local'} to be set to GMT in this case. Although the feeds don't need local times for anything, since RSS/Atom readers seem to do their own timezone translations.
It probably makes sense to add this argument so that nobody gets bit later when they try to use the rfc2822_local field.
Am I correct in interpreting "PATCH -1/3" as: "apply this before Kevin's set of 3 patches?"