static function fromString($str) { if (!php_Boot::$skip_constructor) { if (strlen($str) === 10 || ord(substr($str, 10, 1)) === 32) { return datetime_utils_DateTimeUtils::parse($str); } else { if (ord(substr($str, 10, 1)) === 84) { return datetime_utils_DateTimeUtils::fromIsoString($str); } else { throw new HException("`" . _hx_string_or_null($str) . "` - incorrect date/time format. Should be either `YYYY-MM-DD hh:mm:ss` or `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ss[.SSS]Z`"); } } } }