From: darcy Date: Wed, 05 Jun 2024 06:52:21 GMT Subject: Re: [PATCH v2] date: detect underflow when parsing dates with positive timezone offset Message-ID: In-Reply-To: <20240604093345.GA1279521@coredump.intra.peff.net> On 4/6/24 19:33, Jeff King wrote: > I think the 2099 limitation is there because 2100 is not a leap year, > and the code has over-simplified computation there (it counts every 4th > year as a leap year, which is not generally true for century boundaries, > except for 2000 because it is divisible by 400). Ah, that makes sense, thanks. > If you're interested in picking up the negative timestamp work, I'd be > happy to discuss it. It's been on my todo list for a long time, but I > never quite get around to it. I may look at this in the future, but this looks a little out of my depth at the moment, as I am still unfamiliar with the codebase. For the moment, I will just add the check at year 2099, and possibly will revisit this when I have more time on my hands.