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
Thrown as a MojoExecutionException from BuildTarMojo.execute when the <container><creationTime> value (or jib.container.creationTime property) is neither an ISO 8601 date-time (DateTimeFormatter.ISO_DATE_TIME) nor one of the special keywords EPOCH or USE_CURRENT_TIMESTAMP. Jib validates the container image creation time at build time and reports the offending value in the message.
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildTarMojo.java:130
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
- Set <creationTime> to a full ISO 8601 date-time, e.g. 2021-07-28T10:15:30Z.
- Or use the exact keywords EPOCH or USE_CURRENT_TIMESTAMP (case-sensitive).
- Check any -Djib.container.creationTime override for typos, whitespace, or empty values from CI variables.
- If using ${maven.build.timestamp}, configure maven.build.timestamp.format as yyyy-MM-dd'T'HH:mm:ss'Z' so the injected value parses.
Example fix
<!-- before --> <creationTime>now</creationTime> <!-- after --> <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
Defensive patterns
Strategy: validation
Validate before calling
String c = System.getProperty("jib.container.creationTime", pomValue);
if (c != null && !c.equals("EPOCH") && !c.equals("USE_CURRENT_TIMESTAMP")) {
java.time.format.DateTimeFormatter.ISO_DATE_TIME.parse(c); // throws if invalid
} Prevention
- Prefer the USE_CURRENT_TIMESTAMP keyword over generating timestamps manually.
- Include both date and time components (ISO 8601 date-time, not date-only).
- Keywords are case-sensitive — copy them exactly.
- Validate CI-provided values for emptiness before passing them via -Djib.container.creationTime.
When it happens
Trigger: Running a jib goal with <creationTime> set to something like 'now', '2021-07-28' (date only, no time part), 'use_current_timestamp' (wrong case), or an empty string.
Common situations: Users assume 'now' works, supply a date without a time component, mis-case the keywords, or inject the value via a property/CI variable that is empty or formatted for a different tool.
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><creationTime> should be an ISO 8601 date-time (s
- <container><filesModificationTime> should be an ISO 8601 dat
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/d3915dc9188297e4.
Report an issue: GitHub.