GoogleContainerTools/jib · error · MojoExecutionException
<container><creationTime> should be an ISO 8601 date-time (s
Error message
<container><creationTime> should be an ISO 8601 date-time (see DateTimeFormatter.ISO_DATE_TIME) or a special keyword ("EPOCH", "USE_CURRENT_TIMESTAMP"): <invalidCreationTime> What it means
Jib validates <container><creationTime>, which sets the image creation timestamp. It must be an ISO 8601 date-time (DateTimeFormatter.ISO_DATE_TIME) or one of the special keywords "EPOCH" or "USE_CURRENT_TIMESTAMP". Invalid values raise InvalidCreationTimeException, which execute() wraps into a MojoExecutionException echoing the value.
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildImageMojo.java:152
throw new MojoExecutionException(
"<from><platforms> contains a platform configuration that is missing required values or has invalid values: "
+ ex.getMessage()
+ ": "
+ ex.getInvalidPlatform(),
ex);
} catch (InvalidContainerVolumeException ex) {
throw new MojoExecutionException(
"<container><volumes> is not an absolute Unix-style path: " + ex.getInvalidVolume(), ex);
} catch (InvalidFilesModificationTimeException ex) {
throw new MojoExecutionException(
"<container><filesModificationTime> should be an ISO 8601 date-time (see "
+ "DateTimeFormatter.ISO_DATE_TIME) or special keyword \"EPOCH_PLUS_SECOND\": "
+ ex.getInvalidFilesModificationTime(),
ex);
} catch (InvalidCreationTimeException ex) {
throw new MojoExecutionException(
"<container><creationTime> should be an ISO 8601 date-time (see "
+ "DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\"EPOCH\", "
+ "\"USE_CURRENT_TIMESTAMP\"): "
+ ex.getInvalidCreationTime(),
ex);
} catch (JibPluginExtensionException ex) {
String extensionName = ex.getExtensionClass().getName();
throw new MojoExecutionException(
"error running extension '" + extensionName + "': " + ex.getMessage(), ex);
} catch (IncompatibleBaseImageJavaVersionException ex) {
throw new MojoExecutionException(
HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForMaven(
ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()),
ex);
} catch (InvalidImageReferenceException ex) {View on GitHub (pinned to fb949e2676)
Solutions
- Use a full ISO 8601 timestamp, e.g. 2024-01-01T00:00:00Z.
- Use keyword EPOCH for reproducible builds or USE_CURRENT_TIMESTAMP for build time.
- Remove <creationTime> to use the default (EPOCH).
Example fix
// before <creationTime>now</creationTime> // after <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
Defensive patterns
Strategy: validation
Validate before calling
Set<String> keywords = Set.of("EPOCH", "USE_CURRENT_TIMESTAMP");
String t = System.getProperty("jib.container.creationTime", pomCreationTime);
if (t != null && !keywords.contains(t)) {
try { java.time.format.DateTimeFormatter.ISO_DATE_TIME.parse(t); }
catch (Exception e) { throw new IllegalArgumentException("creationTime must be ISO 8601 or EPOCH/USE_CURRENT_TIMESTAMP: " + t); }
} Try / catch
catch (MojoExecutionException e) { if (e.getMessage().contains("creationTime")) { /* use ISO 8601 or a valid keyword */ } } Prevention
- Valid keywords are only EPOCH and USE_CURRENT_TIMESTAMP — 'now' is not accepted
- Don't reuse EPOCH_PLUS_SECOND (that belongs to filesModificationTime)
- Use EPOCH for reproducible builds unless you need real timestamps
When it happens
Trigger: Setting <creationTime> to values like '2024-01-01', 'now', epoch milliseconds, or any string not parseable as ISO 8601 date-time and not one of the two keywords, via pom.xml or -Djib.container.creationTime.
Common situations: Reproducible-build setups using a plain date; scripts injecting 'now' expecting it to be a keyword; confusion with the filesModificationTime keyword set (EPOCH_PLUS_SECOND is not valid here).
Related errors
- <container><filesModificationTime> should be an ISO 8601 dat
- <container><creationTime> should be an ISO 8601 date-time (s
- <container><filesModificationTime> should be an ISO 8601 dat
- <container><filesModificationTime> should be an ISO 8601 dat
- <container><creationTime> should be an ISO 8601 date-time (s
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/01bdddf5713289cd.
Report an issue: GitHub.