git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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?"

Previous: Jakub NarebskiNext: Jakub Narebski
Message 6 of 12 in “gitweb: rename parse_date() to format_date()”
  1. 1/3 gitweb: rename parse_date() to format_date()Kevin Cernekee, Mar 19, 2011
  2. 2/3 gitweb: introduce localtime featureKevin Cernekee, Mar 19, 2011
  3. 3/3 gitweb: change highlighting of "atnight" commitsKevin Cernekee, Mar 19, 2011
  4. 1/3 gitweb: Always call parse_date with timezone parameterJakub Narebski, Mar 19, 2011
  5. 1/3 gitweb: Always call parse_date with timezone parameterJakub Narebski, Mar 19, 2011
  6. Kevin CernekeeMar 19, 2011
  7. Jakub NarebskiMar 20, 2011
  8. Junio C HamanoMar 20, 2011
  9. 4/3 gitweb: Always call format_date with timezone parameterKevin Cernekee, Mar 20, 2011
  10. Jakub NarebskiMar 20, 2011
  11. Jakub NarebskiMar 20, 2011
  12. Kevin CernekeeMar 20, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.