From: René Scharfe Date: Mon, 19 Oct 2026 17:11:02 GMT Subject: Re: [PATCH] archive-zip: omit UT extra field if mtime is out of range Message-ID: In-Reply-To: <0334c031-56e3-4c8d-8adc-52051d2e26aa@web.de> On 10/12/26 4:45 PM, René Scharfe wrote: > On 10/12/26 2:56 PM, m@sph3r3.com wrote: >> For the i386 failure Junio reported, the beyond-2038 archive test and >> its dependent omission check should use TIME_T_IS_64BIT. TIME_IS_64BIT >> checks Git's timestamp_t, which can be 64-bit while time_t is 32-bit. >> >> With that two-line adjustment, all 18 t5004 tests pass on x86-64 >> Linux. Forcing TIME_T_IS_64BIT off skips only those two tests; the >> other 16 pass, including both INT32_MAX checks. I haven't run a native >> 32-bit build. > > That would be an easy way out, nice! I suspect git archive should not > even use time_t in this context, though. Getting rid of time_t in archive-zip.c is possible, but would require supplying a 64-bit version of localtime_r(3) on 32-bit platforms, which seems excessive. The task would be simpler if we picked a time zone, say UTC, instead of capturing the time zone of the archiver, which is questionable in the first place. That would change the output, breaking caching schemes. In any case, getting rid of time_t would be too much work or trouble just to enable two tests. So right, let's add that requirement for now. René