{"record":{"id":"543525533c950a7d","repo":"GoogleContainerTools/jib","slug":"modificationtime","errorCode":null,"errorMessage":"${modificationTime}","messagePattern":"\\$\\{modificationTime\\}","errorType":"validation","errorClass":"InvalidFilesModificationTimeException","httpStatus":null,"severity":"error","filePath":"jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/PluginConfigurationProcessor.java","lineNumber":929,"sourceCode":"   * @throws InvalidFilesModificationTimeException if the config value is not in ISO 8601 format\n   */\n  @VisibleForTesting\n  static ModificationTimeProvider createModificationTimeProvider(String modificationTime)\n      throws InvalidFilesModificationTimeException {\n    try {\n      switch (modificationTime) {\n        case \"EPOCH_PLUS_SECOND\":\n          Instant epochPlusSecond = Instant.ofEpochSecond(1);\n          return (ignored1, ignored2) -> epochPlusSecond;\n\n        default:\n          Instant timestamp =\n              DateTimeFormatter.ISO_DATE_TIME.parse(modificationTime, Instant::from);\n          return (ignored1, ignored2) -> timestamp;\n      }\n\n    } catch (DateTimeParseException ex) {\n      throw new InvalidFilesModificationTimeException(modificationTime, modificationTime, ex);\n    }\n  }\n\n  /**\n   * Creates an {@link Instant} based on the config value. The value can be:\n   *\n   * <ol>\n   *   <li>{@code EPOCH} to return epoch\n   *   <li>{@code USE_CURRENT_TIMESTAMP} to return the current time\n   *   <li>date in ISO 8601 format\n   * </ol>\n   *\n   * @param configuredCreationTime the config value\n   * @param projectProperties used for logging warnings\n   * @return corresponding {@link Instant}\n   * @throws InvalidCreationTimeException if the config value is invalid\n   */\n  @VisibleForTesting","sourceCodeStart":911,"sourceCodeEnd":947,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/PluginConfigurationProcessor.java#L911-L947","documentation":"Jib's filesModificationTime option accepts 'EPOCH_PLUS_SECOND' or an ISO 8601 date-time. createModificationTimeProvider parses the value with DateTimeFormatter.ISO_DATE_TIME; any DateTimeParseException is rethrown as InvalidFilesModificationTimeException with the configured value shown where ${modificationTime} appears.","triggerScenarios":"processCommonConfiguration -> createModificationTimeProvider when the configured modification time is neither the literal 'EPOCH_PLUS_SECOND' nor parseable by ISO_DATE_TIME (e.g. missing timezone, wrong format).","commonSituations":"Using human formats like '2023-01-15' (date only, lacks time) or '2023-01-15 10:00:00' (space instead of T, no offset); misspelling EPOCH_PLUS_SECOND; build-tool interpolation yielding a placeholder string.","solutions":["Provide a full ISO 8601 date-time with time and offset, e.g. 2023-01-15T10:00:00Z.","Use the literal value EPOCH_PLUS_SECOND if a deterministic early timestamp is intended.","Validate the string with java.time.DateTimeFormatter.ISO_DATE_TIME.parse or Instant.parse in a local test before configuring the build."],"exampleFix":"// before\njib.container.filesModificationTime = '2023-01-15'\n// after\njib.container.filesModificationTime = '2023-01-15T10:00:00Z'","handlingStrategy":"validation","validationCode":"// Validate modification time value before configuring Jib\nif (!modificationTime.equals(\"EPOCH_PLUS_SECOND\")) {\n  java.time.Instant.parse(modificationTime); // throws if not ISO 8601 instant\n}","typeGuard":null,"tryCatchPattern":"try {\n  processCommonConfiguration(...);\n} catch (InvalidFilesModificationTimeException e) {\n  logger.error(\"Bad filesModificationTime '\" + e.getInvalidFilesModificationTime()\n      + \"'; use EPOCH_PLUS_SECOND or ISO 8601 like 2023-01-15T10:00:00Z\");\n}","preventionTips":["Use full ISO 8601 instants with 'Z' or an offset","Prefer the literal EPOCH_PLUS_SECOND for reproducible builds","Test date strings with Instant.parse in a scratch build first"],"tags":["container-image","date-format","java"],"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"}