commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [GUMP@vmgump]: Project commons-compress-test (in module apache-commons) failed
Date Fri, 11 Jan 2013 17:36:41 GMT
On 2013-01-11, Stefan Bodewig wrote:

> On 2013-01-10, Julius Davies wrote:

>> This is one my unit tests that I recently added that's failing.

> They fail on my machine as well (GMT+1 right now) and create times one
> hour different from vmgump which runs in GMT.

> The times that are different from the expected times are the times taken
> directly from ZipEntry and not those taken from the extra field.

At least for my machine I've fixed the tests.

I think you have created the archive using InfoZIP's zip.  zip writes
(and expects) the time stored in ZIP LFHs (and CDs) to be in GMT while
java.util.zip.ZipEntry expects them to be in local time.

Your local YEAR-01-01-00:00 was translated into (YEAR-1)-12-31-16:00
when you created the archive and java.util.zip takes this as local time.
Think I have this the right way around, but I'm starting to confuse
myself here :-)

Tests pass on my machine now by first adding my local GMT offset and
then adding eight hours.  I haven't tested it for any other time zone
but am confident it will work for vmgump as well (since the GMT offset
is 0 there).  In particular I didn't try a system where DST is active on
new years day - the test likely needs to take this into account as well.

Stefan

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


Mime
View raw message