TimeZone tz = parseTimeZonePart(tzElt, zc);
TimeZone tz = parseTimeZonePart(tzElt, zsc);
    protected SearchParams parseCommonParameters(Element request, ZimbraSoapContext zc) throws ServiceException {        String query = request.getAttribute(MailService.E_QUERY, null);        if (query == null)            query = getRequestedAccount(zc).getAttr(Provisioning.A_zimbraPrefMailInitialSearch);        if (query == null)            throw ServiceException.INVALID_REQUEST("no query submitted and no default query found", null);        SearchParams params = new SearchParams();                //        // <loc>        Element locElt = request.getOptionalElement(MailService.E_LOCALE);        if (locElt != null) {            Locale loc = parseLocale(locElt, zc);            params.setLocale(loc);        }        //        // <tz>        Element tzElt = request.getOptionalElement(MailService.E_APPT_TZ);        if (tzElt != null) {            TimeZone tz = parseTimeZonePart(tzElt, zc);            params.setTimeZone(tz);        }                params.setOffset(getOffset(request));        params.setLimit(getLimit(request));        params.setQueryStr(query);        String groupByStr = request.getAttribute(MailService.A_SEARCH_TYPES, null);        if (groupByStr == null)            groupByStr = request.getAttribute(MailService.A_GROUPBY, MailboxIndex.GROUP_BY_CONVERSATION);        params.setTypesStr(groupByStr);        params.setSortByStr(request.getAttribute(MailService.A_SORTBY, MailboxIndex.SortBy.DATE_DESCENDING.toString()));        params.setFetchFirst(request.getAttributeBool(MailService.A_FETCH, false));        if (params.getFetchFirst()) {            params.setWantHtml(request.getAttributeBool(MailService.A_WANT_HTML, false));            params.setMarkRead(request.getAttributeBool(MailService.A_MARK_READ, false));        }        params.setWantRecipients(request.getAttributeBool(MailService.A_RECIPIENTS, false));        Element cursor = request.getOptionalElement(MailService.E_CURSOR);        if (cursor != null) {//            int prevMailItemId = (int)cursor.getAttributeLong(MailService.A_ID);//          int prevOffset = (int)cursor.getAttributeLong(MailService.A_QUERY_OFFSET);                        String cursorStr = cursor.getAttribute(MailService.A_ID);            ItemId prevMailItemId = null;            if (cursorStr != null)                prevMailItemId = new ItemId(cursorStr, zc);                        int prevOffset = 0;            String sortVal = cursor.getAttribute(MailService.A_SORTVAL);            params.setCursor(prevMailItemId, sortVal, prevOffset);        }        return params;    }