int startDay = -1;
int startDay = NOT_SET;
    SessionSchedule(SessionSettings settings, SessionID sessionID) throws ConfigError,            FieldConvertError {        boolean startDayPresent = settings.isSetting(sessionID, Session.SETTING_START_DAY);        boolean endDayPresent = settings.isSetting(sessionID, Session.SETTING_END_DAY);        if (startDayPresent && !endDayPresent) {            throw new ConfigError("Session " + sessionID + ": StartDay used without EndDay");        }        if (endDayPresent && !startDayPresent) {            throw new ConfigError("Session " + sessionID + ": EndDay used without StartDay");        }        boolean weeklySession = startDayPresent && endDayPresent;        String startTimeString = settings.getString(sessionID, Session.SETTING_START_TIME);        String endTimeString = settings.getString(sessionID, Session.SETTING_END_TIME);        if (settings.isSetting(sessionID, Session.SETTING_TIMEZONE)) {            String sessionTimeZoneID = settings.getString(sessionID, Session.SETTING_TIMEZONE);            sessionTimeZone = TimeZone.getTimeZone(sessionTimeZoneID);            if ("GMT".equals(sessionTimeZone.getID()) && !"GMT".equals(sessionTimeZoneID)) {                throw new ConfigError("Unrecognized time zone '" + sessionTimeZoneID                        + "' for session " + sessionID);            }        } else {            sessionTimeZone = TimeZone.getTimeZone("UTC");        }        Matcher matcher = TIME_PATTERN.matcher(startTimeString);        if (!matcher.find()) {            throw new ConfigError("Session " + sessionID + ": could not parse start time '"                    + startTimeString + "'.");        }        Calendar localTime = SystemTime.getUtcCalendar();        localTime.setTimeZone(sessionTimeZone);        localTime.set(Calendar.MILLISECOND, 0);        localTime.set(Calendar.HOUR_OF_DAY, Integer.parseInt(matcher.group(1)));        localTime.set(Calendar.MINUTE, Integer.parseInt(matcher.group(2)));        localTime.set(Calendar.SECOND, Integer.parseInt(matcher.group(3)));        Calendar startTime = SystemTime.getUtcCalendar();        startTime.setTime(localTime.getTime());        int startDay = -1;        if (weeklySession) {            startDay = getDay(settings, sessionID, Session.SETTING_START_DAY, -1);        }        matcher = TIME_PATTERN.matcher(endTimeString);        if (!matcher.find()) {            throw new ConfigError("Session " + sessionID + ": could not parse end time '"                    + endTimeString + "'.");        }        localTime.set(Calendar.HOUR_OF_DAY, Integer.parseInt(matcher.group(1)));        localTime.set(Calendar.MINUTE, Integer.parseInt(matcher.group(2)));        localTime.set(Calendar.SECOND, Integer.parseInt(matcher.group(3)));        Calendar endTime = SystemTime.getUtcCalendar();        endTime.setTime(localTime.getTime());        int endDay = -1;        if (weeklySession) {            endDay = getDay(settings, sessionID, Session.SETTING_END_DAY, -1);        }        initialize(startDay, startTime, endDay, endTime);    }