From a717b30b22419a9d84c77d2c4b1d6e383ca13550 Mon Sep 17 00:00:00 2001 From: Antonio Musarra Date: Fri, 13 Dec 2024 21:58:54 +0100 Subject: [PATCH] Fixed the assign value to the latestCommitTime: Replaced the method Instant.ofEpochMilli() with the method Instant.ofEpochSecond() because RevCommit.getCommitTime() return the number of the seconds from epoch. (cherry picked from commit 47cbf6e5d77a5d3a21db5de525ec9d434e2fc786) --- .../src/main/java/io/quarkus/info/deployment/InfoProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java b/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java index 27e76b19964310..135751323adeff 100644 --- a/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java +++ b/extensions/info/deployment/src/main/java/io/quarkus/info/deployment/InfoProcessor.java @@ -85,7 +85,7 @@ void gitInfo(InfoBuildTimeConfig config, Map commit = new LinkedHashMap<>(); String latestCommitId = latestCommit.getName(); commit.put("id", latestCommitId); - String latestCommitTime = formatDate(Instant.ofEpochMilli(latestCommit.getCommitTime()), ZoneId.systemDefault()); + String latestCommitTime = formatDate(Instant.ofEpochSecond(latestCommit.getCommitTime()), ZoneId.systemDefault()); commit.put("time", latestCommitTime); if (addFullInfo) {