{"record":{"id":"31dcc3f4ef72d616","repo":"GoogleContainerTools/jib","slug":"container-creationtime-should-be-an-iso-8601-date-31dcc3","errorCode":null,"errorMessage":"container.creationTime should be an ISO 8601 date-time (see DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\"EPOCH\", \"USE_CURRENT_TIMESTAMP\"): ${ex.getInvalidCreationTime()}","messagePattern":"container\\.creationTime should be an ISO 8601 date-time \\(see DateTimeFormatter\\.ISO_DATE_TIME\\) or a special keyword \\(\"EPOCH\", \"USE_CURRENT_TIMESTAMP\"\\): (.+?)","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildImageTask.java","lineNumber":157,"sourceCode":"          \"from.platforms contains a platform configuration that is missing required values or has invalid values: \"\n              + ex.getMessage()\n              + \": \"\n              + ex.getInvalidPlatform(),\n          ex);\n\n    } catch (InvalidContainerVolumeException ex) {\n      throw new GradleException(\n          \"container.volumes is not an absolute Unix-style path: \" + ex.getInvalidVolume(), ex);\n\n    } catch (InvalidFilesModificationTimeException ex) {\n      throw new GradleException(\n          \"container.filesModificationTime should be an ISO 8601 date-time (see \"\n              + \"DateTimeFormatter.ISO_DATE_TIME) or special keyword \\\"EPOCH_PLUS_SECOND\\\": \"\n              + ex.getInvalidFilesModificationTime(),\n          ex);\n\n    } catch (InvalidCreationTimeException ex) {\n      throw new GradleException(\n          \"container.creationTime should be an ISO 8601 date-time (see \"\n              + \"DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\\\"EPOCH\\\", \"\n              + \"\\\"USE_CURRENT_TIMESTAMP\\\"): \"\n              + ex.getInvalidCreationTime(),\n          ex);\n\n    } catch (JibPluginExtensionException ex) {\n      String extensionName = ex.getExtensionClass().getName();\n      throw new GradleException(\n          \"error running extension '\" + extensionName + \"': \" + ex.getMessage(), ex);\n\n    } catch (IncompatibleBaseImageJavaVersionException ex) {\n      throw new GradleException(\n          HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForGradle(\n              ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()),\n          ex);\n\n    } catch (InvalidImageReferenceException ex) {","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildImageTask.java#L139-L175","documentation":"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().","triggerScenarios":"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.","commonSituations":"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.","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)."],"exampleFix":"// before\njib {\n  container { creationTime = 'now' }\n}\n// after\njib {\n  container { creationTime = 'USE_CURRENT_TIMESTAMP' }\n}","handlingStrategy":"validation","validationCode":"def ct = jib.container.creationTime\nif (ct != null && !(ct in ['EPOCH', 'USE_CURRENT_TIMESTAMP'])) {\n  try { java.time.format.DateTimeFormatter.ISO_DATE_TIME.parse(ct) }\n  catch (Exception e) { throw new GradleException(\"creationTime invalid: $ct\") }\n}","typeGuard":null,"tryCatchPattern":"try {\n  tasks.named('jib').get().execute()\n} catch (GradleException e) {\n  if (e.message?.startsWith('container.creationTime should be')) {\n    logger.error(\"Use ISO 8601, EPOCH, or USE_CURRENT_TIMESTAMP: ${e.message}\")\n  }\n  throw e\n}","preventionTips":["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."],"tags":["gradle","jib","configuration","date-format"],"backgroundTag":"invalid-date-format","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}