public function fromString($input, $format = null): ?TimePoint
    {
        if ($format === null) {
            $formats = [
                'Y-m-d\TH:i:sP',        // RFC 3339
                'Y-m-d\TH:i:s.uP',      // RFC 3339 with fractional seconds
                'Y-m-d\TH:i:sO',        // ISO 8601
                'Y-m-d\TH:i:s.uO',      // ISO 8601 with fractional seconds and period
                'Y-m-d\TH:i:s,uO',      // ISO 8601 with fractional seconds and comma
                'Y-m-d\TH:iO',          // ISO 8601 with no seconds
            ];

            do {
                $datetime = DateTime::createFromFormat(array_shift($formats), $input, $this->timezone);
            } while (!$datetime instanceof DateTime && count($formats) > 0);

        } else {
            $datetime = DateTime::createFromFormat($format, $input, $this->timezone);
        }

        return ($datetime instanceof DateTime) ? $this->fromDateTime($datetime) : null;
    }