std.addAttribute(MailService.A_APPT_TZ_WEEK, standard.getWeek()); std.addAttribute(MailService.A_APPT_TZ_DAYOFWEEK, standard.getDayOfWeek());
if (standard.hasRule()) { std.addAttribute(MailService.A_APPT_TZ_WEEK, standard.getWeek()); std.addAttribute(MailService.A_APPT_TZ_DAYOFWEEK, standard.getDayOfWeek()); } else std.addAttribute(MailService.A_APPT_TZ_DAYOFMONTH, standard.getDayOfMonth());
    private static void encodeTimeZoneMap(Element parent, TimeZoneMap tzmap) {        assert(tzmap != null);        for (Iterator iter = tzmap.tzIterator(); iter.hasNext(); ) {            ICalTimeZone tz = (ICalTimeZone) iter.next();            Element e = parent.addElement(MailService.E_APPT_TZ);            e.addAttribute(MailService.A_ID, tz.getID());            e.addAttribute(MailService.A_APPT_TZ_STDOFFSET, tz.getStandardOffset() / 60 / 1000);            if (tz.useDaylightTime()) {                SimpleOnset standard = tz.getStandardOnset();                SimpleOnset daylight = tz.getDaylightOnset();                if (standard != null && daylight != null) {                    e.addAttribute(MailService.A_APPT_TZ_DAYOFFSET, tz.getDaylightOffset() / 60 / 1000);                    Element std = e.addElement(MailService.E_APPT_TZ_STANDARD);                    std.addAttribute(MailService.A_APPT_TZ_WEEK, standard.getWeek());                    std.addAttribute(MailService.A_APPT_TZ_DAYOFWEEK, standard.getDayOfWeek());                    std.addAttribute(MailService.A_APPT_TZ_MONTH, standard.getMonth());                    std.addAttribute(MailService.A_APPT_TZ_HOUR, standard.getHour());                    std.addAttribute(MailService.A_APPT_TZ_MINUTE, standard.getMinute());                    std.addAttribute(MailService.A_APPT_TZ_SECOND, standard.getSecond());                    Element day = e.addElement(MailService.E_APPT_TZ_DAYLIGHT);                    day.addAttribute(MailService.A_APPT_TZ_WEEK, daylight.getWeek());                    day.addAttribute(MailService.A_APPT_TZ_DAYOFWEEK, daylight.getDayOfWeek());                    day.addAttribute(MailService.A_APPT_TZ_MONTH, daylight.getMonth());                    day.addAttribute(MailService.A_APPT_TZ_HOUR, daylight.getHour());                    day.addAttribute(MailService.A_APPT_TZ_MINUTE, daylight.getMinute());                    day.addAttribute(MailService.A_APPT_TZ_SECOND, daylight.getSecond());                }            }        }    }