From 535d3552ca0e5fe56d44a97f8bb15d58412b578f Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 11 Jul 2008 09:25:30 +0000 Subject: [PATCH] document disagreement of different ZIP implementations when it comes to timestamps git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@675882 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTasks/unzip.html | 18 ++++++++++++++++++ docs/manual/CoreTasks/zip.html | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/docs/manual/CoreTasks/unzip.html b/docs/manual/CoreTasks/unzip.html index ff395e3b7..5979ba29a 100644 --- a/docs/manual/CoreTasks/unzip.html +++ b/docs/manual/CoreTasks/unzip.html @@ -47,6 +47,24 @@ Prior to Ant 1.7 only fileset has been supported as a nested element.

File permissions will not be restored on extracted files.

The untar task recognizes the long pathname entries used by GNU tar.

+ +

Please note that different ZIP tools handle timestamps +differently when it comes to applying timezone offset calculations of +files. Some ZIP libraries will store the timestamps as they've been +read from the filesystem while others will modify the timestamps both +when reading and writing the files to make all timestamps use the same +timezone. A ZIP archive created by one library may extract files with +"wrong timestamps" when extracted by another library.

+ +

Ant's ZIP classes use the same algorithm as the InfoZIP tools and +zlib (timestamps get adjusted), Windows' "compressed folders" function +and WinZIP don't change the timestamps. This means that using the +unzip task on files created by Windows' compressed folders function +may create files with timestamps that are "wrong", the same is true if +you use Windows' functions to extract an Ant generated ZIP +archive.

+ +

Parameters

diff --git a/docs/manual/CoreTasks/zip.html b/docs/manual/CoreTasks/zip.html index aa3ed9c93..e2f7e078e 100644 --- a/docs/manual/CoreTasks/zip.html +++ b/docs/manual/CoreTasks/zip.html @@ -90,6 +90,22 @@ documented as causing various problems for unsuspecting users. If you wish to avoid this behavior you must set the duplicate attribute to a value other than its default, "add".

+

Please also note that different ZIP tools handle timestamps +differently when it comes to applying timezone offset calculations of +files. Some ZIP libraries will store the timestamps as they've been +read from the filesystem while others will modify the timestamps both +when reading and writing the files to make all timestamps use the same +timezone. A ZIP archive created by one library may extract files with +"wrong timestamps" when extracted by another library.

+ +

Ant's ZIP classes use the same algorithm as the InfoZIP tools and +zlib (timestamps get adjusted), Windows' "compressed folders" function +and WinZIP don't change the timestamps. This means that using the +unzip task on files created by Windows' compressed folders function +may create files with timestamps that are "wrong", the same is true if +you use Windows' functions to extract an Ant generated ZIP +archive.

+

Parameters