commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <>
Subject Re: [compress] ar/cpio and last modfied times
Date Fri, 31 Jul 2009 20:55:33 GMT
Stefan Bodewig a écrit :

> I've started to implement a commons-compress based antlib over in Ant
> land
> <>

Nice! Do you plan to replace the archive/compress tasks in Ant with the 
new ones?

> To make things even worse, cpio claims it would be seconds since the
> epoch but sets it with System.currentTimeMillis when unset
> (CpioArchiveOutputStream#putArchiveEntry) which will be milliseconds
> since the epoch - who is correct?

CPIO time is in seconds.

> Can anybody more familiar with ar or cpio shed some light on what the
> formats really expect?

I couldn't find a clear specification of the ar format, and the original 
code is not very readable [1], but I'm pretty sure the modification time 
is in seconds too. Otherwise the date couldn't exceed 2001 (12 decimal 
digits with milliseconds allows only 31 years from 1970).

Emmanuel Bourg


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message