{"record":{"id":"0fa98d65fd1b0dfb","repo":"GoogleContainerTools/jib","slug":"container-filesmodificationtime-should-be-an-iso-8","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\": (.+?)","errorType":"validation","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildDockerTask.java","lineNumber":155,"sourceCode":"      throw new GradleException(\n          \"container.workingDirectory is not an absolute Unix-style path: \"\n              + ex.getInvalidPathValue(),\n          ex);\n\n    } catch (InvalidPlatformException ex) {\n      throw new GradleException(\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\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","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildDockerTask.java#L137-L173","documentation":"Thrown when container.filesModificationTime is not a valid ISO 8601 date-time (DateTimeFormatter.ISO_DATE_TIME) nor the special keyword 'EPOCH_PLUS_SECOND'. This setting controls the modification timestamps assigned to files added to the image.","triggerScenarios":"Setting filesModificationTime to a non-ISO string like 'now', '2024/01/15 10:00:00', a epoch number, or an unrecognized keyword.","commonSituations":"Trying to set timestamps to 'now' or a unix epoch integer, using locale-formatted dates, or confusing this option with container.creationTime's keyword set ('EPOCH' vs 'EPOCH_PLUS_SECOND').","solutions":["Use an ISO 8601 date-time string, e.g. filesModificationTime = \"2024-01-15T10:00:00Z\"","Or use the keyword 'EPOCH_PLUS_SECOND' for reproducible builds","Fix the date format to match DateTimeFormatter.ISO_DATE_TIME"],"exampleFix":"// before\njib { container { filesModificationTime = 'now' } }\n// after\njib { container { filesModificationTime = 'EPOCH_PLUS_SECOND' } }","handlingStrategy":"validation","validationCode":"def t = jib.container.filesModificationTime\nif (t != null && !(t in ['EPOCH_PLUS_SECOND']) && !isValidIsoDateTime(t)) {\n  throw new GradleException(\"filesModificationTime must be ISO 8601 or EPOCH_PLUS_SECOND: $t\")\n}","typeGuard":null,"tryCatchPattern":"try { jibBuild.run() } catch (GradleException e) { if (e.message.contains('filesModificationTime')) { logger.error(e.message + \" — use ISO 8601 or EPOCH_PLUS_SECOND\") }; throw e }","preventionTips":["Prefer the 'EPOCH_PLUS_SECOND' keyword for reproducible builds","Format dates with java.time.format.DateTimeFormatter.ISO_DATE_TIME","Don't confuse with creationTime's keyword set"],"tags":["gradle","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"}