{"record":{"id":"05c7d70ceeff071d","repo":"Leantime/leantime","slug":"the-string-is-not-a-valid-date-time-string-to-pars-05c7d7","errorCode":null,"errorMessage":"The string is not a valid date time string to parse as Database string","messagePattern":"The string is not a valid date time string to parse as Database string","errorType":"validation","errorClass":"InvalidDateException","httpStatus":null,"severity":"error","filePath":"app/Core/Support/DateTimeHelper.php","lineNumber":167,"sourceCode":"            }\n\n            throw new InvalidFormatException('The string is not a valid date time string to parse as user datetime string');\n        }\n\n    }\n\n    /**\n     * Parses a database date string and returns a CarbonImmutable instance.\n     *\n     * @param  string  $dbDate  The date string in the database format to parse.\n     * @return CarbonImmutable The parsed CarbonImmutable instance in db timezone (UTC)\n     *\n     * @throws InvalidDateException\n     */\n    public function parseDbDateTime(string $dbDate): CarbonImmutable\n    {\n        if (! $this->isValidDateString($dbDate)) {\n            throw new InvalidDateException('The string is not a valid date time string to parse as Database string', $dbDate);\n        }\n\n        try {\n            $this->datetime = CarbonImmutable::createFromFormat($this->dbFormat, $dbDate, $this->dbTimezone)->locale(\n                $this->userLanguage\n            );\n\n            return $this->datetime;\n\n        } catch (\\Exception $e) {\n\n            // Try standard formats first (non timezone formats are assumed user timezone)\n            $standardFormat = $this->tryParseStandardFormats($dbDate, $this->dbTimezone);\n            if ($standardFormat !== false) {\n                $this->datetime = $standardFormat;\n\n                return $this->datetime;\n            }","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/Leantime/leantime/blob/9a9f49f1008f4782b30f6723c54228f4f992e636/app/Core/Support/DateTimeHelper.php#L149-L185","documentation":"Error \"The string is not a valid date time string to parse as Database string\" thrown in Leantime/leantime.","triggerScenarios":"Thrown at app/Core/Support/DateTimeHelper.php:167 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9a9f49f1008f4782b30f6723c54228f4f992e636","analyzedAt":"2026-08-21T02:37:38.966Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}