{"record":{"id":"c444d39e6499675f","repo":"GoogleContainerTools/jib","slug":"container-filesmodificationtime-should-be-an-is-c444d3","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/BuildTarMojo.java","lineNumber":123,"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":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildTarMojo.java#L105-L141","documentation":"Thrown as a MojoExecutionException from BuildTarMojo.execute when the <container><filesModificationTime> configuration value (or its jib.container.filesModificationTime property) is neither a valid ISO 8601 date-time parseable by DateTimeFormatter.ISO_DATE_TIME nor the special keyword EPOCH_PLUS_SECOND. Jib validates this value when building the container's file timestamps and fails fast with the invalid value included in the message.","triggerScenarios":"Running `mvn jib:buildTar` (or any goal sharing this mojo error handling) with <filesModificationTime> set to a string like '2021/07/28', 'yesterday', '2021-13-45T00:00:00Z', or a typo'd keyword such as 'EPOCH_PLUS_SECOND ' with trailing whitespace/typo variants like 'EPOCH_PLUS_SEC'.","commonSituations":"Developers copy a human-readable date format from other tools, use a locale-dependent format, or try relative-time expressions that Jib does not support; also common when property overrides via -Djib.container.filesModificationTime carry stray whitespace or quotes.","solutions":["Change <filesModificationTime> to an ISO 8601 date-time such as 2021-07-28T10:15:30Z or 2021-07-28T10:15:30+02:00.","If reproducible epoch timestamps are wanted, use the literal keyword EPOCH_PLUS_SECOND exactly (no quotes/extra spaces in the XML value).","If overriding via a Maven property (-Djib.container.filesModificationTime=...), check the value for typos, surrounding whitespace, or shell-added quotes.","If the value is generated dynamically (e.g. ${maven.build.timestamp}), ensure the timestamp format property is ISO 8601, e.g. -Dmaven.build.timestamp.format=yyyy-MM-dd'T'HH:mm:ss'Z'."],"exampleFix":"<!-- before -->\n<filesModificationTime>07/28/2021 10:15</filesModificationTime>\n<!-- after -->\n<filesModificationTime>2021-07-28T10:15:30Z</filesModificationTime>","handlingStrategy":"validation","validationCode":"// before running mvn, verify the configured value\nString t = System.getProperty(\"jib.container.filesModificationTime\", pomValue);\nif (t != null && !t.equals(\"EPOCH_PLUS_SECOND\")) {\n  java.time.format.DateTimeFormatter.ISO_DATE_TIME.parse(t); // throws if invalid\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always use ISO 8601 (yyyy-MM-dd'T'HH:mm:ss[.SSS]Z) for filesModificationTime.","Use EPOCH_PLUS_SECOND keyword for reproducible builds instead of hand-written dates.","If injecting via ${maven.build.timestamp}, set maven.build.timestamp.format=yyyy-MM-dd'T'HH:mm:ss'Z'.","Avoid shell/CI quoting that adds whitespace or quotes around the value."],"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"}