{"record":{"id":"4c7ceb70cd8763aa","repo":"GoogleContainerTools/jib","slug":"container-filesmodificationtime-should-be-an-iso-8-4c7ceb","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/BuildTarTask.java","lineNumber":172,"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":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildTarTask.java#L154-L190","documentation":"jib.container.filesModificationTime must be either an ISO 8601 date-time string or the special keyword EPOCH_PLUS_SECOND; Jib throws InvalidFilesModificationTimeException for any other value when building via jibBuildTar, and this GradleException echoes the invalid value.","triggerScenarios":"Running gradle jibBuildTar with jib { container { filesModificationTime = 'yesterday' } } or any non-ISO-8601, non-keyword string (e.g. '2024/01/01 10:00', 'now', epoch seconds like '1700000000').","commonSituations":"Trying to set a fixed timestamp using a human-readable format that isn't ISO 8601; passing a Unix epoch number; misspelling the keyword (e.g. 'EPOCH_PLUS_1SEC'); copying a value accepted by a different tool.","solutions":["Use the keyword: jib { container { filesModificationTime = 'EPOCH_PLUS_SECOND' } }","Or supply a valid ISO 8601 date-time, e.g. '2024-01-01T00:00:00Z' (DateTimeFormatter.ISO_DATE_TIME format)","Remove the setting to use the default (EPOCH_PLUS_SECOND behavior)","Check the Jib plugin version's docs for supported keywords before using newer ones"],"exampleFix":"// before\njib { container { filesModificationTime = '2024/01/01 10:00' } }\n// after\njib { container { filesModificationTime = '2024-01-01T10:00:00Z' } }","handlingStrategy":"validation","validationCode":"def t = project.jib.container.filesModificationTime.getOrElse('EPOCH_PLUS_SECOND')\ndef ok = t == 'EPOCH_PLUS_SECOND' || (t ==~ /^\\d{4}-\\d{2}-\\d{2}T.+/ && { try { java.time.format.DateTimeFormatter.ISO_DATE_TIME.parse(t); true } catch (e) { false } }())\nassert ok : \"Invalid filesModificationTime: $t\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer the EPOCH_PLUS_SECOND keyword for reproducible builds","When using a fixed time, generate ISO 8601 strings programmatically (DateTimeFormatter.ISO_DATE_TIME)","Don't pass Unix epoch numbers or locale-formatted dates"],"tags":["jib","gradle","validation","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"}