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 29
29
<version >${surefire.version} </version >
30
30
</plugin >
31
31
<plugin >
32
+ <!-- Used to generate the version / commit information -->
32
33
<groupId >pl.project13.maven</groupId >
33
34
<artifactId >git-commit-id-plugin</artifactId >
34
35
<version >4.0.3</version >
Original file line number Diff line number Diff line change 1
1
package io .javaoperatorsdk .operator .api .config ;
2
2
3
3
import java .io .IOException ;
4
- import java .text .DateFormat ;
5
4
import java .text .ParseException ;
5
+ import java .text .SimpleDateFormat ;
6
6
import java .time .Instant ;
7
7
import java .util .Date ;
8
8
import java .util .Properties ;
@@ -21,7 +21,10 @@ public static Version loadFromProperties() {
21
21
22
22
Date builtTime ;
23
23
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" ));
25
28
} catch (ParseException e ) {
26
29
builtTime = Date .from (Instant .EPOCH );
27
30
}
You can’t perform that action at this time.
0 commit comments