Git development
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org, Josh McKinney <git-bugs@lists.joshka.net>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/3] date: add helpers to convert between "+HHMM" timezones and minutes
Date: Wed, 30 Sep 2026 14:05:28 +0200	[thread overview]
Message-ID: <arz7CNEhQSoDwJ77@pks.im> (raw)
In-Reply-To: <CAOLa=ZQRDVL2Djh4du1zWGg_ABZTyzaWDYYb0PDg3EXAfpn7bA@mail.gmail.com>

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 :)

> 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

  reply	other threads:[~2026-09-30 12:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29  9:56 [PATCH 0/3] refs/reftable: fix on-disk representation of reflog timezones Patrick Steinhardt
2026-09-29  9:56 ` [PATCH 1/3] date: add helpers to convert between "+HHMM" timezones and minutes Patrick Steinhardt
2026-09-30 11:47   ` Karthik Nayak
2026-09-30 12:05     ` Patrick Steinhardt [this message]
2026-10-01 10:18       ` Karthik Nayak
2026-09-30 19:54     ` Junio C Hamano
2026-09-29  9:56 ` [PATCH 2/3] t/helper: fix segfault in "dump-reftable -t" Patrick Steinhardt
2026-09-29  9:56 ` [PATCH 3/3] refs/reftable: fix on-disk representation of reflog timezones Patrick Steinhardt
2026-09-30 11:51   ` Karthik Nayak
2026-09-30 12:05     ` Patrick Steinhardt
2026-10-01  5:38 ` [PATCH v2 0/3] " Patrick Steinhardt
2026-10-01  5:39   ` [PATCH v2 1/3] date: add helpers to convert between "+HHMM" timezones and minutes Patrick Steinhardt
2026-10-01  5:39   ` [PATCH v2 2/3] t/helper: fix segfault in "dump-reftable -t" Patrick Steinhardt
2026-10-01  5:39   ` [PATCH v2 3/3] refs/reftable: fix on-disk representation of reflog timezones Patrick Steinhardt
2026-10-01 10:19   ` [PATCH v2 0/3] " Karthik Nayak
2026-10-01 17:11     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=arz7CNEhQSoDwJ77@pks.im \
    --to=ps@pks.im \
    --cc=git-bugs@lists.joshka.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=karthik.188@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox