{"record":{"id":"25784168393d1ef5","repo":"GoogleContainerTools/jib","slug":"container-filesmodificationtime-should-be-an-iso-8-257841","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/BuildImageTask.java","lineNumber":150,"sourceCode":"    } catch (InvalidWorkingDirectoryException ex) {\n      throw new GradleException(\n          \"container.workingDirectory is not an absolute Unix-style path: \"\n              + ex.getInvalidPathValue(),\n          ex);\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":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildImageTask.java#L132-L168","documentation":"container.filesModificationTime accepts either an ISO 8601 date-time (parsed with DateTimeFormatter.ISO_DATE_TIME) or the special keyword EPOCH_PLUS_SECOND; it controls the modification timestamps assigned to files added to the image. InvalidFilesModificationTimeException is thrown for any other value, and the Gradle task rethrows it as this GradleException.","triggerScenarios":"Setting jib.container.filesModificationTime to a non-ISO string like '2024/01/01', 'now', or an empty value and running a jib build task.","commonSituations":"Using human-readable date formats; expecting a 'now' keyword that doesn't exist; time-zone-less formats that ISO_DATE_TIME rejects (e.g. '2024-01-01 00:00:00'); copying config from another tool with different accepted formats.","solutions":["Use a valid ISO 8601 date-time, e.g. '2024-01-01T00:00:00Z'.","Use the special keyword EPOCH_PLUS_SECOND if a deterministic constant timestamp is wanted.","Remove the setting to use the default (EPOCH_PLUS_SECOND behavior)."],"exampleFix":"// before\njib {\n  container { filesModificationTime = '2024/01/01' }\n}\n// after\njib {\n  container { filesModificationTime = '2024-01-01T00:00:00Z' }\n}","handlingStrategy":"validation","validationCode":"def fmt = jib.container.filesModificationTime\nif (fmt != null && fmt != 'EPOCH_PLUS_SECOND') {\n  try { java.time.format.DateTimeFormatter.ISO_DATE_TIME.parse(fmt) }\n  catch (Exception e) { throw new GradleException(\"filesModificationTime invalid: $fmt\") }\n}","typeGuard":null,"tryCatchPattern":"try {\n  tasks.named('jib').get().execute()\n} catch (GradleException e) {\n  if (e.message?.startsWith('container.filesModificationTime should be')) {\n    logger.error(\"Use ISO 8601 date-time or EPOCH_PLUS_SECOND: ${e.message}\")\n  }\n  throw e\n}","preventionTips":["Prefer the EPOCH_PLUS_SECOND keyword for reproducible builds.","Validate date strings with DateTimeFormatter.ISO_DATE_TIME before configuring.","Avoid locale-formatted dates in generated config."],"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-14T00:17:10.932Z"}