{"record":{"id":"7b486b1b711c85d4","repo":"GoogleContainerTools/jib","slug":"container-creationtime-should-be-an-iso-8601-date-7b486b","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/BuildTarTask.java","lineNumber":179,"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":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildTarTask.java#L161-L197","documentation":"jib's buildTar task wraps InvalidCreationTimeException in a GradleException because the 'container.creationTime' build configuration could not be parsed. Jib expects the value to be an ISO 8601 date-time parseable by DateTimeFormatter.ISO_DATE_TIME, or one of the special keywords \"EPOCH\" or \"USE_CURRENT_TIMESTAMP\". The raw invalid string is included in the message via ex.getInvalidCreationTime().","triggerScenarios":"Setting container { creationTime = ... } in the jib Gradle extension with a string that is neither ISO 8601 (e.g. '2021-07-13' date-only, or a custom format like 'MM/dd/yyyy HH:mm:ss') nor the exact keywords EPOCH / USE_CURRENT_TIMESTAMP, then running any jib task including jibBuildTar (BuildTarTask.buildTar).","commonSituations":"Developers copy a human-readable date from logs or a Dockerfile-style date into creationTime; they use a date-only value without time and offset; they use a different keyword like 'now' or 'current' assuming it is supported.","solutions":["Change container.creationTime to a full ISO 8601 date-time, e.g. '2023-01-15T10:30:00+00:00' or '2023-01-15T10:30:00Z'","Use the special keyword 'USE_CURRENT_TIMESTAMP' to stamp images with build time, or 'EPOCH' for Unix epoch 0","If the value comes from a property, print/validate it with java.time.format.DateTimeFormatter.ISO_DATE_TIME.parse(value) before passing it to Jib"],"exampleFix":"// before\njib.container.creationTime = '01/15/2023 10:30'\n// after\njib.container.creationTime = '2023-01-15T10:30:00Z'\n// or\njib.container.creationTime = 'USE_CURRENT_TIMESTAMP'","handlingStrategy":"validation","validationCode":"def validCreationTime = { s ->\n  s in ['EPOCH', 'USE_CURRENT_TIMESTAMP'] ||\n  { try { java.time.format.DateTimeFormatter.ISO_DATE_TIME.parse(s); true } catch (ignored) { false } ) }\n}\nassert validCreationTime(jib.container.creationTime.get())","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the keywords EPOCH or USE_CURRENT_TIMESTAMP unless reproducible timestamps are required","Always store ISO 8601 with time and zone offset (e.g. 2023-01-15T10:30:00Z), never locale-formatted strings","Add a build-script assertion that parses the timestamp with DateTimeFormatter.ISO_DATE_TIME"],"tags":["jib","gradle","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"}