@@ -900,7 +900,9 @@ private Map<String, Supplier<String>> generateGlobalFormatPlaceholderMap(GitSitu
900
900
placeholderMap .put ("commit.timestamp.minute" , Lazy .by (() -> leftPad (String .valueOf (headCommitDateTime .get ().getMinute ()), 2 , "0" )));
901
901
placeholderMap .put ("commit.timestamp.second" , Lazy .by (() -> leftPad (String .valueOf (headCommitDateTime .get ().getSecond ()), 2 , "0" )));
902
902
placeholderMap .put ("commit.timestamp.datetime" , Lazy .by (() -> headCommitDateTime .get ().toEpochSecond () > 0
903
- ? headCommitDateTime .get ().format (DateTimeFormatter .ofPattern ("yyyyMMdd.HHmmss" )) : "00000000.000000" ));
903
+ ? headCommitDateTime .get ().format (DateTimeFormatter .ofPattern ("yyyyMMdd.HHmmss" )) : "00000101.000000" ));
904
+ placeholderMap .put ("commit.timestamp.iso" , Lazy .by (() -> headCommitDateTime .get ().toEpochSecond () > 0
905
+ ? headCommitDateTime .get ().format (DateTimeFormatter .ISO_INSTANT ) : "0000-01-01T00:00:00Z" ));
904
906
905
907
final Lazy <ZonedDateTime > buildCommitDateTime = Lazy .by (() -> mavenSession .getStartTime ().toInstant ().atZone (ZoneId .systemDefault ()));
906
908
placeholderMap .put ("build.timestamp" , Lazy .by (() -> String .valueOf (buildCommitDateTime .get ().toEpochSecond ())));
@@ -913,6 +915,8 @@ private Map<String, Supplier<String>> generateGlobalFormatPlaceholderMap(GitSitu
913
915
placeholderMap .put ("build.timestamp.second" , Lazy .by (() -> leftPad (String .valueOf (buildCommitDateTime .get ().getSecond ()), 2 , "0" )));
914
916
placeholderMap .put ("build.timestamp.datetime" , Lazy .by (() -> buildCommitDateTime .get ().toEpochSecond () > 0
915
917
? buildCommitDateTime .get ().format (DateTimeFormatter .ofPattern ("yyyyMMdd.HHmmss" )) : "00000000.000000" ));
918
+ placeholderMap .put ("build.timestamp.iso" , Lazy .by (() -> buildCommitDateTime .get ().toEpochSecond () > 0
919
+ ? headCommitDateTime .get ().format (DateTimeFormatter .ISO_INSTANT ) : "0000-01-01T00:00:00Z" ));
916
920
917
921
final String refName = gitVersionDetails .getRefName ();
918
922
final Lazy <String > refNameSlug = Lazy .by (() -> slugify (refName ));
0 commit comments