{"record":{"id":"5367d37fe88cabc2","repo":"GoogleContainerTools/jib","slug":"container-creationtime-should-be-an-iso-8601-da","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\"): <invalidCreationTime>","messagePattern":"<container><creationTime> should be an ISO 8601 date-time \\(see DateTimeFormatter\\.ISO_DATE_TIME\\) or a special keyword \\(\"EPOCH\", \"USE_CURRENT_TIMESTAMP\"\\): <invalidCreationTime>","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java","lineNumber":151,"sourceCode":"              + \"DateTimeFormatter.ISO_DATE_TIME) or special keyword \\\"EPOCH_PLUS_SECOND\\\": \"\n              + ex.getInvalidFilesModificationTime(),\n          ex);\n\n    } catch (InvalidCreationTimeException ex) {\n      throw new MojoExecutionException(\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 MojoExecutionException(\n          \"error running extension '\" + extensionName + \"': \" + ex.getMessage(), ex);\n\n    } catch (IncompatibleBaseImageJavaVersionException ex) {\n      throw new MojoExecutionException(\n          HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForMaven(\n              ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()),\n          ex);\n\n    } catch (InvalidImageReferenceException ex) {\n      throw new MojoExecutionException(\n          HelpfulSuggestions.forInvalidImageReference(ex.getInvalidReference()), ex);\n\n    } catch (IOException\n        | CacheDirectoryCreationException\n        | MainClassInferenceException\n        | InvalidGlobalConfigException ex) {\n      throw new MojoExecutionException(ex.getMessage(), ex);\n\n    } catch (BuildStepsExecutionException ex) {\n      throw new MojoExecutionException(ex.getMessage(), ex.getCause());\n\n    } catch (ExtraDirectoryNotFoundException ex) {","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java#L133-L169","documentation":"<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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"<!-- before -->\n<container><creationTime>now</creationTime></container>\n<!-- after -->\n<container><creationTime>USE_CURRENT_TIMESTAMP</creationTime></container>","handlingStrategy":"validation","validationCode":"String t = pomCreationTime;\nboolean ok = t == null || t.equals(\"EPOCH\") || t.equals(\"USE_CURRENT_TIMESTAMP\");\nif (!ok) { java.time.format.DateTimeFormatter.ISO_DATE_TIME.parse(t); }","typeGuard":"boolean isValidCreationTime(String t) {\n  return t == null || t.equals(\"EPOCH\") || t.equals(\"USE_CURRENT_TIMESTAMP\") || tryParseIso(t);\n}","tryCatchPattern":null,"preventionTips":["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."],"tags":["maven","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-14T05:17:10.506Z"}