{"record":{"id":"155cb893b58e941d","repo":"apache/hadoop","slug":"unable-to-parse-the-specified-timestamp","errorCode":null,"errorMessage":"Unable to parse the specified timestamp ","messagePattern":"Unable to parse the specified timestamp ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/TouchCommands.java","lineNumber":183,"sourceCode":"          return;\n        }\n        item.fs.create(item.path).close();\n        if (timestamp != null) {\n          // update the time only if user specified a timestamp using -t option.\n          updateTime(item);\n        }\n      } else {\n        updateTime(item);\n      }\n    }\n\n    private void updateTime(PathData item) throws IOException {\n      long time = System.currentTimeMillis();\n      if (timestamp != null) {\n        try {\n          time = dateFormat.parse(timestamp).getTime();\n        } catch (ParseException e) {\n          throw new IllegalArgumentException(\n              \"Unable to parse the specified timestamp \"+ timestamp\n              + \". The expected format is \" + dateFormat.toPattern(), e);\n        }\n      }\n      if (changeModTime ^ changeAccessTime) {\n        long atime = changeModTime ? -1 : time;\n        long mtime = changeAccessTime ? -1 : time;\n        item.fs.setTimes(item.path, mtime, atime);\n      } else {\n        item.fs.setTimes(item.path, time, time);\n      }\n    }\n  }\n}\n","sourceCodeStart":165,"sourceCodeEnd":198,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/TouchCommands.java#L165-L198","documentation":"Error \"Unable to parse the specified timestamp \" thrown in apache/hadoop.","triggerScenarios":"Thrown by the touch shell command when the -d timestamp argument cannot be parsed into a valid date.","commonSituations":"See trigger scenarios.","solutions":["Pass the timestamp in the expected format (yyyyMMddHHmmss) for the -t option.","Check the timestamp string for invalid characters or wrong length."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}