From 796c92acec34cb3d6bcc2e4f58019bf967e18389 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. --- .../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 27e76b1996431..135751323adef 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) {