{"record":{"id":"a6541e1af9cf8703","repo":"GoogleContainerTools/jib","slug":"container-filesmodificationtime-should-be-an-is","errorCode":null,"errorMessage":"<container><filesModificationTime> should be an ISO 8601 date-time (see DateTimeFormatter.ISO_DATE_TIME) or special keyword \"EPOCH_PLUS_SECOND\": <invalidFilesModificationTime>","messagePattern":"<container><filesModificationTime> should be an ISO 8601 date-time \\(see DateTimeFormatter\\.ISO_DATE_TIME\\) or special keyword \"EPOCH_PLUS_SECOND\": <invalidFilesModificationTime>","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java","lineNumber":147,"sourceCode":"\n    } catch (InvalidFilesModificationTimeException ex) {\n      throw new MojoExecutionException(\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 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","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java#L129-L165","documentation":"<container><filesModificationTime> accepts either an ISO 8601 date-time (DateTimeFormatter.ISO_DATE_TIME format) or the special keyword \"EPOCH_PLUS_SECOND\". Any other string causes InvalidFilesModificationTimeException, which BuildDockerMojo.execute() wraps in a MojoExecutionException echoing the invalid value.","triggerScenarios":"Setting <filesModificationTime> to values like 'now', a non-ISO format such as '2024/01/15 10:00:00', an empty string, or a misspelled keyword, then running any jib goal.","commonSituations":"Trying to set reproducible build timestamps with human-readable dates; confusing this option with <creationTime> whose keywords (EPOCH, USE_CURRENT_TIMESTAMP) don't apply here; copying a Dockerfile LABEL-style date format.","solutions":["Use an ISO 8601 date-time such as 2024-01-15T10:00:00Z or the keyword EPOCH_PLUS_SECOND.","Format the date with DateTimeFormatter.ISO_DATE_TIME (e.g. 2024-01-15T10:00:00+02:00) — no slashes or space-separated dates.","If you meant a fixed EPOCH time, use the literal ISO value 1970-01-01T00:00:00Z instead of the keyword 'EPOCH', which is only valid for <creationTime>."],"exampleFix":"<!-- before -->\n<container><filesModificationTime>now</filesModificationTime></container>\n<!-- after -->\n<container><filesModificationTime>2024-01-15T10:00:00Z</filesModificationTime></container>","handlingStrategy":"validation","validationCode":"String t = pomFilesModificationTime;\nif (t != null && !t.equals(\"EPOCH_PLUS_SECOND\")) {\n  java.time.format.DateTimeFormatter.ISO_DATE_TIME.parse(t); // throws if not ISO 8601\n}","typeGuard":"boolean isValidFilesModificationTime(String t) {\n  return t == null || t.equals(\"EPOCH_PLUS_SECOND\") || tryParseIso(t);\n}","tryCatchPattern":null,"preventionTips":["Generate timestamps with DateTimeFormatter.ISO_DATE_TIME, never by hand.","Remember this option accepts only EPOCH_PLUS_SECOND as a keyword — 'EPOCH' belongs to creationTime.","For reproducible builds prefer a fixed ISO timestamp or EPOCH_PLUS_SECOND."],"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"}