[10] RFR: 8184940: JDK 9 rejects zip files where the modified day or month is 0

Liam Miller-Cushon cushon at google.com
Mon Aug 14 20:07:46 UTC 2017


On Mon, Jul 31, 2017 at 11:41 AM, Liam Miller-Cushon <cushon at google.com>
wrote:

> On Fri, Jul 28, 2017 at 3:30 PM, Martin Buchholz <martinrb at google.com>
> wrote:
>
>> It looks like this will test only the year, not all the date fields.
>> Shouldn't that be s/25/16/ ?
>> Does this code handle the "true" epoch of 1980-01-01 ?
>>
>
> It does now, thanks:
> http://cr.openjdk.java.net/~cushon/8184940/webrev.02/
>
> This raises the question of what it should do if a day or month is zero
> but year/month/day are not all zero. Is 1980-0-0 special, or should
> 1980-0-1 and 1980-1-0 also be tolerated for compatibility with JDK 8?
>

As discussed offline, there are no known instances of tools deliberately
writing zip archives where a day or month is '0' other than 1980-0-0. So
the current approach seems better than continuing to interpret e.g.
1980-1-0 as 1979-12-31 or 1980-0-1 as 1979-12-01.


More information about the core-libs-dev mailing list