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
Junio C Hamano <gitster@pobox.com>
Date
Mar 20, 2011, 00:27 UTC
Message-ID
<7v39miws8p.fsf@alter.siamese.dyndns.org>
In-Reply-To
<AANLkTimV7vvD0PTMejydiyW_CeUH0cuQ-2+PnRqjzob5@mail.gmail.com>
Kevin Cernekee <cernekee@gmail.com> writes:
Show 7 quoted lines
> On Sat, Mar 19, 2011 at 3:18 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> ...
> 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.

Thanks for being careful, I agree "while at it, remove an unnecessary call" would be better.

Show 6 quoted lines
>> @@ -7064,7 +7064,7 @@ sub git_feed {
> ...
> 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.
I would say it isn't good in _any_ case.

If the localtime conversion logic _were_ very expensive, and if the function that fills 'rfc2822_local' _were_ written to allow callers that do not need local time by passing undef to its tz parameter to avoid the computation cost, it may make sense to allow 'rfc2822_local' to be undef, but neither is true. This callsite was simply buggy.

> Am I correct in interpreting "PATCH -1/3" as: "apply this before
> Kevin's set of 3 patches?"

I had the same reaction; judging from the contents, I now realize that is what was meant by "minus one", but originally I read that hyphen as "I don't know how many iterations we had so instead of writing v$N I am just striking it out" ;-)

Previous: Jakub NarebskiNext: Kevin Cernekee
Message 8 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.