Skip to content

Commit

Permalink
Fixed the assign value to the latestCommitTime:
Browse files Browse the repository at this point in the history
Replaced the method Instant.ofEpochMilli() with the method
Instant.ofEpochSecond() because RevCommit.getCommitTime()
return the number of the seconds from epoch.
  • Loading branch information
amusarra authored and gsmet committed Dec 16, 2024
1 parent 81c3cf1 commit 796c92a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void gitInfo(InfoBuildTimeConfig config,
Map<String, Object> 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) {
Expand Down

0 comments on commit 796c92a

Please sign in to comment.