public static function verifyDateTime(string $datetime, string $format): bool
    {
        $formatted = DateTime::createFromFormat($format, $datetime);

        $errors = DateTime::getLastErrors();

        if (!empty($errors['warning_count'])) {
            return false;
        }

        return $formatted !== false;
    }