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
<container><creationTime> must be an ISO 8601 date-time or one of the special keywords "EPOCH" or "USE_CURRENT_TIMESTAMP". Any other value raises InvalidCreationTimeException, converted by BuildDockerMojo.execute() into a MojoExecutionException that echoes the invalid value.
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java:151
+ "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) {
throw new MojoExecutionException(
HelpfulSuggestions.forInvalidImageReference(ex.getInvalidReference()), ex);
} catch (IOException
| CacheDirectoryCreationException
| MainClassInferenceException
| InvalidGlobalConfigException ex) {
throw new MojoExecutionException(ex.getMessage(), ex);
} catch (BuildStepsExecutionException ex) {
throw new MojoExecutionException(ex.getMessage(), ex.getCause());
} catch (ExtraDirectoryNotFoundException ex) {View on GitHub (pinned to fb949e2676)
Solutions
- Use an ISO 8601 date-time (e.g. 2024-01-15T10:00:00Z) or exactly EPOCH or USE_CURRENT_TIMESTAMP.
- Check keyword spelling and case; keywords are case-sensitive uppercase with underscores.
- If a timestamp comes from an environment variable or property, format it with DateTimeFormatter.ISO_DATE_TIME before it reaches the pom.
- Use USE_CURRENT_TIMESTAMP only when reproducibility is not required, since it embeds build time.
Example fix
<!-- before --> <container><creationTime>now</creationTime></container> <!-- after --> <container><creationTime>USE_CURRENT_TIMESTAMP</creationTime></container>
Defensive patterns
Strategy: validation
Validate before calling
String t = pomCreationTime;
boolean ok = t == null || t.equals("EPOCH") || t.equals("USE_CURRENT_TIMESTAMP");
if (!ok) { java.time.format.DateTimeFormatter.ISO_DATE_TIME.parse(t); } Type guard
boolean isValidCreationTime(String t) {
return t == null || t.equals("EPOCH") || t.equals("USE_CURRENT_TIMESTAMP") || tryParseIso(t);
} Prevention
- Use only the exact keywords EPOCH or USE_CURRENT_TIMESTAMP, or a valid ISO 8601 timestamp.
- Don't confuse creationTime's keywords with filesModificationTime's EPOCH_PLUS_SECOND.
- Sanitize any timestamp injected from environment variables in CI before it reaches the pom.
When it happens
Trigger: Configuring <creationTime> with values like 'now', a locale-formatted date, an empty string, a misspelled keyword ('use_current_timestamp'), or using EPOCH_PLUS_SECOND (a filesModificationTime-only keyword) here.
Common situations: Attempting reproducible builds with hand-written timestamps; mixing up the keyword sets of creationTime vs filesModificationTime; injecting the value via CI variables in the wrong format; upgrading from older Jib versions where fewer keywords existed.
Related errors
- <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
- <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/5367d37fe88cabc2.
Report an issue: GitHub.