git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 17:03 UTC

Re: [PATCH 1/3] date: add helpers to convert between "+HHMM" timezones and minutes

From
Karthik Nayak <karthik.188@gmail.com>
Date
Oct 1, 2026, 10:18 UTC
Message-ID
<CAOLa=ZQHhf2obR2OjvgmE5HqRpkWvn9WjE+-LeTx1WYgbQp0Dw@mail.gmail.com>
In-Reply-To
<arz7CNEhQSoDwJ77@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 6 quoted lines
> On Wed, Sep 30, 2026 at 04:47:02AM -0700, Karthik Nayak wrote:
>
> One suggestion: I'd recommend trimming the mails you're responding to a
> bit more aggressively. Otherwise one is hunting for responses in files
> and hunks that are not relevant to your remarks :)
>
Sure, will do that more henceforth.
Show 20 quoted lines
>> Patrick Steinhardt <ps@pks.im> writes:
>> > diff --git a/date.c b/date.c
>> > index 014065b419..63ea9dbc76 100644
>> > --- a/date.c
>> > +++ b/date.c
>> > @@ -103,8 +113,7 @@ static int local_time_tzoffset(time_t t, struct tm *tm)
>> >  		offset = t_local - t;
>> >  	}
>> >  	offset /= 60; /* in minutes */
>> > -	offset = (offset % 60) + ((offset / 60) * 100);
>> > -	return offset * eastwest;
>> > +	return minutes_to_tz(offset * eastwest);
>>
>> While mathematically it's the same, but shouldn't this have been
>> `minutes_to_tz(offset) * eastwest`?
>
> I guess we can. It's probably less confusing if we do it this way
> indeed.
>
> Patrick
Yup. Thanks
Previous: Patrick SteinhardtNext: Karthik Nayak
Message 14 of 16 in “refs/reftable: fix on-disk representation of reflog timezones”
  1. 0/3 refs/reftable: fix on-disk representation of reflog timezonesPatrick Steinhardt, Sep 29, 2026
  2. 1/3 date: add helpers to convert between "+HHMM" timezones and minutesPatrick Steinhardt, Sep 29, 2026
  3. 2/3 t/helper: fix segfault in "dump-reftable -t"Patrick Steinhardt, Sep 29, 2026
  4. 3/3 refs/reftable: fix on-disk representation of reflog timezonesPatrick Steinhardt, Sep 29, 2026
  5. Karthik NayakSep 30, 2026
  6. Karthik NayakSep 30, 2026
  7. Patrick SteinhardtSep 30, 2026
  8. Patrick SteinhardtSep 30, 2026
  9. Junio C HamanoSep 30, 2026
  10. 0/3 refs/reftable: fix on-disk representation of reflog timezonesPatrick Steinhardt, Oct 1, 2026
  11. 1/3 date: add helpers to convert between "+HHMM" timezones and minutesPatrick Steinhardt, Oct 1, 2026
  12. 2/3 t/helper: fix segfault in "dump-reftable -t"Patrick Steinhardt, Oct 1, 2026
  13. 3/3 refs/reftable: fix on-disk representation of reflog timezonesPatrick Steinhardt, Oct 1, 2026
  14. Karthik NayakOct 1, 2026
  15. Karthik NayakOct 1, 2026
  16. Junio C HamanoOct 1, 2026

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.