GoogleContainerTools/jib · error · GradleException
container.creationTime should be an ISO 8601 date-time (see
Error message
container.creationTime should be an ISO 8601 date-time (see DateTimeFormatter.ISO_DATE_TIME) or a special keyword ("EPOCH", "USE_CURRENT_TIMESTAMP"): ${ex.getInvalidCreationTime()} What it means
container.creationTime sets the image creation timestamp and must be an ISO 8601 date-time (DateTimeFormatter.ISO_DATE_TIME) or one of the special keywords EPOCH or USE_CURRENT_TIMESTAMP. InvalidCreationTimeException is thrown for other values, and the Gradle task surfaces it as this GradleException including the invalid value from ex.getInvalidCreationTime().
Source
Thrown at jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildImageTask.java:157
"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 GradleException(
"container.volumes is not an absolute Unix-style path: " + ex.getInvalidVolume(), ex);
} catch (InvalidFilesModificationTimeException ex) {
throw new GradleException(
"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 GradleException(
"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 GradleException(
"error running extension '" + extensionName + "': " + ex.getMessage(), ex);
} catch (IncompatibleBaseImageJavaVersionException ex) {
throw new GradleException(
HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForGradle(
ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()),
ex);
} catch (InvalidImageReferenceException ex) {View on GitHub (pinned to fb949e2676)
Solutions
- Use the keyword USE_CURRENT_TIMESTAMP to stamp builds with the current time.
- Use EPOCH for a deterministic timestamp (good for reproducible builds).
- Provide a full ISO 8601 date-time like '2024-01-01T00:00:00Z'.
- Remove the property to use the default (EPOCH).
Example fix
// before
jib {
container { creationTime = 'now' }
}
// after
jib {
container { creationTime = 'USE_CURRENT_TIMESTAMP' }
} Defensive patterns
Strategy: validation
Validate before calling
def ct = jib.container.creationTime
if (ct != null && !(ct in ['EPOCH', 'USE_CURRENT_TIMESTAMP'])) {
try { java.time.format.DateTimeFormatter.ISO_DATE_TIME.parse(ct) }
catch (Exception e) { throw new GradleException("creationTime invalid: $ct") }
} Try / catch
try {
tasks.named('jib').get().execute()
} catch (GradleException e) {
if (e.message?.startsWith('container.creationTime should be')) {
logger.error("Use ISO 8601, EPOCH, or USE_CURRENT_TIMESTAMP: ${e.message}")
}
throw e
} Prevention
- Use EPOCH or USE_CURRENT_TIMESTAMP keywords instead of hand-written dates.
- Validate ISO 8601 format before assigning creationTime.
- Note 'now' is NOT a valid keyword; use USE_CURRENT_TIMESTAMP.
When it happens
Trigger: Setting jib.container.creationTime to a malformed date-time or an unrecognized keyword (e.g. 'now', 'today', '2024/01/01') and running a jib build task.
Common situations: Assuming 'now' is a supported keyword (only USE_CURRENT_TIMESTAMP is); slashes instead of ISO 'T' separators; missing timezone offsets; config generated by scripts with locale date formatting.
Related errors
- container.filesModificationTime should be an ISO 8601 date-t
- container.creationTime should be an ISO 8601 date-time (see
- container.filesModificationTime should be an ISO 8601 date-t
- container.filesModificationTime should be an ISO 8601 date-t
- container.creationTime should be an ISO 8601 date-time (see
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/31dcc3f4ef72d616.
Report an issue: GitHub.