{"record":{"id":"2af6ccd891ae1b93","repo":"GoogleContainerTools/jib","slug":"container-filesmodificationtime-should-be-an-is-2af6cc","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/BuildImageMojo.java","lineNumber":145,"sourceCode":"\n    } catch (InvalidWorkingDirectoryException ex) {\n      throw new MojoExecutionException(\n          \"<container><workingDirectory> is not an absolute Unix-style path: \"\n              + ex.getInvalidPathValue(),\n          ex);\n    } catch (InvalidPlatformException ex) {\n      throw new MojoExecutionException(\n          \"<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    } catch (InvalidContainerVolumeException ex) {\n      throw new MojoExecutionException(\n          \"<container><volumes> is not an absolute Unix-style path: \" + ex.getInvalidVolume(), ex);\n\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","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildImageMojo.java#L127-L163","documentation":"Jib validates <container><filesModificationTime>, which controls timestamps assigned to files in the image. The value must be an ISO 8601 date-time parseable by DateTimeFormatter.ISO_DATE_TIME or the special keyword \"EPOCH_PLUS_SECOND\". Anything else raises InvalidFilesModificationTimeException, wrapped into a MojoExecutionException with the invalid value.","triggerScenarios":"Setting <filesModificationTime> to a plain date like '2024-01-01', a human string like 'yesterday', an epoch number like '1700000000', or an arbitrary non-ISO string.","commonSituations":"Attempting reproducible builds with hand-formatted timestamps; assuming epoch seconds are accepted; forgetting the time component in the ISO string.","solutions":["Use a full ISO 8601 date-time such as 2024-01-01T00:00:00Z.","Use the keyword EPOCH_PLUS_SECOND (or EPOCH-equivalent defaults) for reproducible output.","Remove the element to use the default (EPOCH_PLUS_SECOND)."],"exampleFix":"// before\n<filesModificationTime>2024-01-01</filesModificationTime>\n// after\n<filesModificationTime>2024-01-01T00:00:00Z</filesModificationTime>","handlingStrategy":"validation","validationCode":"String t = System.getProperty(\"jib.container.filesModificationTime\", pomTime);\nif (t != null && !t.equals(\"EPOCH_PLUS_SECOND\")) {\n  try { java.time.format.DateTimeFormatter.ISO_DATE_TIME.parse(t); }\n  catch (Exception e) { throw new IllegalArgumentException(\"filesModificationTime must be ISO 8601 or EPOCH_PLUS_SECOND: \" + t); }\n}","typeGuard":null,"tryCatchPattern":"catch (MojoExecutionException e) { if (e.getMessage().contains(\"filesModificationTime\")) { /* use full ISO 8601 datetime or the keyword */ } }","preventionTips":["Use full ISO 8601 including time and zone: 2024-01-01T00:00:00Z","Use the EPOCH_PLUS_SECOND keyword for reproducible builds","Parse-test the value locally with DateTimeFormatter.ISO_DATE_TIME before adding it"],"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-14T00:17:10.932Z"}