File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
src/main/java/io/javaoperatorsdk/operator/api/config Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 2929 <version >${surefire.version} </version >
3030 </plugin >
3131 <plugin >
32+ <!-- Used to generate the version / commit information -->
3233 <groupId >pl.project13.maven</groupId >
3334 <artifactId >git-commit-id-plugin</artifactId >
3435 <version >4.0.3</version >
Original file line number Diff line number Diff line change 11package io .javaoperatorsdk .operator .api .config ;
22
33import java .io .IOException ;
4- import java .text .DateFormat ;
54import java .text .ParseException ;
5+ import java .text .SimpleDateFormat ;
66import java .time .Instant ;
77import java .util .Date ;
88import java .util .Properties ;
@@ -21,7 +21,10 @@ public static Version loadFromProperties() {
2121
2222 Date builtTime ;
2323 try {
24- builtTime = DateFormat .getDateTimeInstance ().parse (properties .getProperty ("git.build.time" ));
24+ builtTime =
25+ // RFC 822 date is the default format used by git-commit-id-plugin
26+ new SimpleDateFormat ("yyyy-MM-dd'T'HH:mm:ssZ" )
27+ .parse (properties .getProperty ("git.build.time" ));
2528 } catch (ParseException e ) {
2629 builtTime = Date .from (Instant .EPOCH );
2730 }
You can’t perform that action at this time.
0 commit comments