commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <ebo...@apache.org>
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
> <https://svn.apache.org/repos/asf/ant/sandbox/antlibs/compress/trunk/>

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?

http://people.freebsd.org/~kientzle/libarchive/man/cpio.5.txt

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


[1] 
http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/ar.c?rev=1.60&cvsroot=src

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message