You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2019/09/04 22:16:07 UTC

[maven-source-plugin] branch MSOURCES-120 updated: display local timezone offset and file date/time

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch MSOURCES-120
in repository https://gitbox.apache.org/repos/asf/maven-source-plugin.git


The following commit(s) were added to refs/heads/MSOURCES-120 by this push:
     new 4ff518f  display local timezone offset and file date/time
4ff518f is described below

commit 4ff518f40786def7c7931b88dd6d762ac57dfe58
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Thu Sep 5 00:16:03 2019 +0200

    display local timezone offset and file date/time
---
 src/it/reproducible/verify.groovy | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/it/reproducible/verify.groovy b/src/it/reproducible/verify.groovy
index 0801ae8..c9c8e7c 100644
--- a/src/it/reproducible/verify.groovy
+++ b/src/it/reproducible/verify.groovy
@@ -38,7 +38,8 @@ File jarFile = new File( deployDir, 'reproducible-1.0-sources.jar' )
 ZipFile zipFile = new ZipFile( jarFile );
 
 r.append( 'encoding: ' + zipFile.getEncoding()  + '\n' )
-r.append( 'M size (cmp) crc      java time     zip time   mode   name -comment; extra\n' )
+r.append( 'timezone offset (minutes): ' + new Date().getTimezoneOffset() + '\n' )
+r.append( 'M size (cmp) crc      java time     date       time     zip time   mode   name -comment; extra\n' )
 
 String describeExtra( ZipExtraField[] extras )
 {
@@ -65,7 +66,7 @@ long javaToDosTime( Date d )
 
 for ( ZipArchiveEntry zae : zipFile.getEntries() )
 {
-    r.append( sprintf( "%d %4d (%3d) %8x %d %d %6o %s %s; %s\n", zae.getMethod(), zae.getSize(), zae.getCompressedSize(), zae.getCrc(), zae.getTime(), javaToDosTime( zae.getLastModifiedDate() ), zae.getUnixMode(), zae.getName(), ( zae.getComment() == null ) ? '-' : zae.getComment(), describeExtra( zae.getExtraFields() ) ) )
+    r.append( sprintf( "%d %4d (%3d) %8x %d %<tF %<tT %d %6o %s %s; %s\n", zae.getMethod(), zae.getSize(), zae.getCompressedSize(), zae.getCrc(), zae.getTime(), javaToDosTime( zae.getLastModifiedDate() ), zae.getUnixMode(), zae.getName(), ( zae.getComment() == null ) ? '-' : zae.getComment(), describeExtra( zae.getExtraFields() ) ) )
 }
 zipFile.close();