This is an automated email from the ASF dual-hosted git repository.
kdoran pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-maven.git
The following commit(s) were added to refs/heads/main by this push:
new 150b1bd [NIFI-10325] force UTC timezone expected by date format (#21)
150b1bd is described below
commit 150b1bd70bbe80c392eed1b70a489804f07b6fd0
Author: Hervé Boutemy <[email protected]>
AuthorDate: Tue Nov 29 16:05:45 2022 +0100
[NIFI-10325] force UTC timezone expected by date format (#21)
Signed-off-by: Kevin Doran <[email protected]>
---
src/main/java/org/apache/nifi/NarMojo.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/main/java/org/apache/nifi/NarMojo.java
b/src/main/java/org/apache/nifi/NarMojo.java
index d355232..e1cb252 100644
--- a/src/main/java/org/apache/nifi/NarMojo.java
+++ b/src/main/java/org/apache/nifi/NarMojo.java
@@ -99,6 +99,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.TimeZone;
import java.util.TreeSet;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
@@ -1093,6 +1094,7 @@ public class NarMojo extends AbstractMojo {
}
SimpleDateFormat dateFormat = new
SimpleDateFormat(BUILD_TIMESTAMP_FORMAT);
+ dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
archive.addManifestEntry("Build-Timestamp",
dateFormat.format(timestamp == null ? new Date() : timestamp));
archive.addManifestEntry("Clone-During-Instance-Class-Loading",
String.valueOf(cloneDuringInstanceClassLoading));