{"record":{"id":"46e82460976268b5","repo":"GoogleContainerTools/jib","slug":"container-filesmodificationtime-should-be-an-iso-8-46e824","errorCode":null,"errorMessage":"container.filesModificationTime should be an ISO 8601 date-time (see DateTimeFormatter.ISO_DATE_TIME) or special keyword \"EPOCH_PLUS_SECOND\": ${ex.getInvalidFilesModificationTime()}","messagePattern":"container\\.filesModificationTime should be an ISO 8601 date-time \\(see DateTimeFormatter\\.ISO_DATE_TIME\\) or special keyword \"EPOCH_PLUS_SECOND\": (.+?)","errorType":"exception","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":"This is the same InvalidFilesModificationTimeException surfacing as error 147: container.filesModificationTime must be an ISO 8601 date-time (DateTimeFormatter.ISO_DATE_TIME) or the keyword EPOCH_PLUS_SECOND. The Gradle task wraps the exception in a GradleException whose message interpolates ex.getInvalidFilesModificationTime(), echoing the exact rejected value.","triggerScenarios":"Running a jib build task when jib.container.filesModificationTime (or -Djib.container.filesModificationTime) holds a string that fails ISO 8601 parsing and is not EPOCH_PLUS_SECOND.","commonSituations":"Same as the parent family: locale-formatted dates, missing timezone designator ('2024-01-01T00:00:00' without Z is usually accepted by ISO_DATE_TIME, but formats with slashes or 'now' are not), or property files injecting malformed values.","solutions":["Provide an ISO 8601 date-time with timezone, e.g. '2024-06-01T12:00:00Z'.","Use EPOCH_PLUS_SECOND for reproducible builds.","Delete the property to accept the default."],"exampleFix":"// before\njib {\n  container { filesModificationTime = 'now' }\n}\n// after\njib {\n  container { filesModificationTime = 'EPOCH_PLUS_SECOND' }\n}","handlingStrategy":"validation","validationCode":"def fmt = jib.container.filesModificationTime\nif (fmt != null && fmt != 'EPOCH_PLUS_SECOND') {\n  try { java.time.OffsetDateTime.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?.contains('filesModificationTime')) {\n    logger.error(\"Rejected value was: ${e.message}\")\n  }\n  throw e\n}","preventionTips":["Use strict parsing (OffsetDateTime.parse) in scripts that generate the value.","Always include a timezone designator (Z or offset).","Test the generated config once in CI before relying on it."],"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"}