timeParser.setTimeZone(sessionTimeZone);
    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);        SimpleDateFormat timeParser = timeParser = new SimpleDateFormat("HH:mm:ss yyyyMMdd");        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");        }        timeParser.setTimeZone(sessionTimeZone);        SimpleDateFormat ymd = new SimpleDateFormat("yyyyMMdd");        String dateString = " " + ymd.format(new Date());        try {            Date parsedStartTime = timeParser.parse(startTimeString + dateString);            startTime = Calendar.getInstance(TimeZone.getTimeZone("UTC"));            startTime.setTime(parsedStartTime);            startTime.set(1970, 0, 1);            if (weeklySession) {                startDay = getDay(settings, sessionID, Session.SETTING_START_DAY, -1);            }        } catch (ParseException e) {            throw new ConfigError("Session " + sessionID + ": could not parse start time '"                    + startTimeString + "'.");        }        try {            Date parsedEndTime = timeParser.parse(endTimeString + dateString);            endTime = Calendar.getInstance(TimeZone.getTimeZone("UTC"));            endTime.setTime(parsedEndTime);            endTime.set(1970, 0, 1);            if (weeklySession) {                endDay = getDay(settings, sessionID, Session.SETTING_END_DAY, -1);            }        } catch (ParseException e) {            throw new ConfigError("Session " + sessionID + ": could not parse end time '"                    + endTimeString + "'.");        }        calendar1.setTimeZone(TimeZone.getTimeZone("UTC"));        calendar2.setTimeZone(TimeZone.getTimeZone("UTC"));    }