{"record":{"id":"b94268570b9f7f0f","repo":"phacility/phabricator","slug":"supplied-min-date-is-not-valid-see-help-for-val","errorCode":null,"errorMessage":"Supplied --min-date is not valid. See help for valid examples.\nSupplied value: '%s'\n","messagePattern":"Supplied --min-date is not valid\\. See help for valid examples\\.\nSupplied value: '(.+?)'\n","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php","lineNumber":140,"sourceCode":"      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify which steps to reparse with \"--message\", \"--change\", '.\n          'and/or \"--publish\"; or \"--importing\" to run all missing steps.'));\n    }\n\n    $min_timestamp = false;\n    if ($min_date) {\n      $min_timestamp = strtotime($min_date);\n\n      if (!$all_from_repo) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'You must use \"--all\" if you specify \"--min-date\".'));\n      }\n\n      // previous to PHP 5.1.0 you would compare with -1, instead of false\n      if (false === $min_timestamp) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            \"Supplied --min-date is not valid. See help for valid examples.\\n\".\n            \"Supplied value: '%s'\\n\",\n            $min_date));\n      }\n    }\n\n    $commits = array();\n    if ($all_from_repo) {\n      $repository = id(new PhabricatorRepositoryQuery())\n        ->setViewer(PhabricatorUser::getOmnipotentUser())\n        ->withIdentifiers(array($all_from_repo))\n        ->executeOne();\n\n      if (!$repository) {\n        throw new PhutilArgumentUsageException(\n          pht('Unknown repository \"%s\"!', $all_from_repo));\n      }","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php#L122-L158","documentation":"reparse feeds the `--min-date` value to PHP's strtotime(); a return value of false means the string is not a parseable date/time. The workflow surfaces the original value in this PhutilArgumentUsageException so the operator can correct the format.","triggerScenarios":"Passing an ambiguous or malformed date like `01/02/03`, `2020-13-45`, `yesterday noonish`, or a locale-specific format strtotime() rejects; unquoted values mangled by shell splitting.","commonSituations":"Scripts interpolating user input or environment variables into `--min-date`; timezone abbreviations or formats that differ from what the server's PHP accepts; copy-paste of dates with typographic dashes or spaces.","solutions":["Use an unambiguous machine format strtotime() always parses, e.g. `--min-date '2020-01-01'` or an ISO-8601 timestamp `'2020-01-01T00:00:00Z'`.","Quote the argument in the shell so spaces and special characters survive.","If generating dates programmatically, normalize first (e.g. `date -u +%Y-%m-%d`)."],"exampleFix":"# before\n./bin/repository reparse --all R --change --min-date 01/02/03\n# Usage exception: Supplied --min-date is not valid... Supplied value: '01/02/03'\n\n# after\n./bin/repository reparse --all R --change --min-date '2020-01-01'","handlingStrategy":"validation","validationCode":"# Normalize and verify the date before passing it\nmin_date=$(date -u -d \"$USER_DATE\" +%Y-%m-%dT%H:%M:%S 2>/dev/null) || {\n  echo \"unparseable date: $USER_DATE\" >&2; exit 2;\n}\n./bin/repository reparse --all \"$REPO\" --change --min-date \"$min_date\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate dates programmatically (e.g. `date -u +%Y-%m-%d`) instead of typing free-form strings.","Always quote `--min-date` values in the shell.","Stick to ISO-8601 / `YYYY-MM-DD` formats understood by strtotime() on every PHP version."],"tags":["php","phabricator","cli","reparse","date-parsing","strtotime"],"backgroundTag":"invalid-date-format","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}