From 803f9c877e38830d1e24188e5240fb8d56bd5468 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Sun, 27 Oct 2013 18:12:58 +0000 Subject: [PATCH] explicitly set milliseconds to 0 when parsing ZipEntry's time field, it has two second granularity anyway git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1536171 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/zip/ZipUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/zip/ZipUtil.java b/src/main/org/apache/tools/zip/ZipUtil.java index 2910149d0..af5459039 100644 --- a/src/main/org/apache/tools/zip/ZipUtil.java +++ b/src/main/org/apache/tools/zip/ZipUtil.java @@ -107,6 +107,7 @@ public abstract class ZipUtil { cal.set(Calendar.HOUR_OF_DAY, (int) (dosTime >> 11) & 0x1f); cal.set(Calendar.MINUTE, (int) (dosTime >> 5) & 0x3f); cal.set(Calendar.SECOND, (int) (dosTime << 1) & 0x3e); + cal.set(Calendar.MILLISECOND, 0); // CheckStyle:MagicNumberCheck ON return cal.getTime().getTime(); } @@ -228,4 +229,4 @@ public abstract class ZipUtil { .Feature.METHOD, ze); } } -} \ No newline at end of file +}