public static function set($name, $value, $days = 30, $basepath = '/')
    {
        // Gems uses the empty string when the base path is '/'
        if (! $basepath) {
            $basepath = '/';
        }

        if (\Zend_Session::$_unitTestEnabled) {
            return true;
        }

        // Set the cookie for 30 days
        return setcookie($name, $value, time() + ($days * 86400), $basepath, '', (APPLICATION_ENV == 'production'), true);
    }