Re: [PATCH v4 40/44] builtin-am: support and auto-detect mercurial patches
- From
Paul Tan <pyokagan@gmail.com>
- Date
- Jul 1, 2015, 09:07 UTC
- Message-ID
- <CACRoPnQJqoXuWgQieTfgNCoA-b=21g1OgH9RzGFO5Q7dRhOV5w@mail.gmail.com>
- In-Reply-To
- <CAGZ79kbnxSD5bm_Bhjy8W2oY+1Mb=is_BcfbT5mGsb44fJE5nQ@mail.gmail.com>
On Tue, Jun 30, 2015 at 4:32 AM, Stefan Beller <sbeller@google.com> wrote:
Show 14 quoted lines
> On Mon, Jun 29, 2015 at 1:32 PM, Stefan Beller <sbeller@google.com> wrote: >> On Sun, Jun 28, 2015 at 7:06 AM, Paul Tan <pyokagan@gmail.com> wrote: >>> + tz = tz / (60 * 60) * 100 + tz % (60 * 60); >> >> What happens if we have a negative input not matching a full hour, say -5400 ? >> (would equate to 0130 in git) >> >> for calculating the minutes we would only need to take % 3600 (which >> you do), but >> then we still need to divide by 60 to convert seconds to minutes? >> > > That said, I wonder if we have some helper functions around somewhere as we > need to convert the timezone data at many places.
We convert timezone data at many places? Hmm, I thought all the time related stuff was confined to date.c.
As far as I know from browsing around the source code, Git keeps the timezone in the 24-hour format at all times, so there isn't a helper function for converting from mercurial's "seconds" format to git's 24-hour format.
Thanks, Paul