public static function fromString(string $time, string $tz = null): self
    {
        try {
            if (!isset($tz)) {
                $tz = date_default_timezone_get();
            }
            return new static(
                new \DateTimeImmutable($time, self::_createTimeZone($tz)));
        } catch (\Exception $e) {
            throw new \RuntimeException(
                "Failed to create DateTime: " .
                self::_getLastDateTimeImmutableErrorsStr(), 0, $e);
        }
    }