room.setRoomtype(rt);
roomDao.update(room, users_id);
}
}
User user = userManager.getUserById(users_id);
// Refactor the given time ignoring the Date is always UTC!
TimeZone timezone = timezoneUtil.getTimezoneByUser(user);
//Transform the user time in a local time of the server
//machines locale timeZone and store that to the db
Date appointmentstart = new Date(TimezoneUtil.getCalendarInTimezone(appointmentstartStr, timezone).getTime().getTime());
Date appointmentend = new Date(TimezoneUtil.getCalendarInTimezone(appointmentendStr, timezone).getTime().getTime());
log.debug("up2 timezone "+timezone);
log.debug("up2 appointmentstartStr "+appointmentstartStr);
log.debug("up2 appointmentendStr "+appointmentendStr);
log.debug("up2 appointmentstart "+appointmentstart);
log.debug("up2 appointmentend "+appointmentend);
return appointmentDao.updateAppointment(appointmentId,
appointmentName, appointmentDescription,
appointmentstart, appointmentend, isDaily, isWeekly,
isMonthly, isYearly, categoryId, remind, mmClient,
users_id, baseUrl, language_id, isPasswordProtected, password, user
.getOmTimeZone().getIcal(), appointmentLocation);
}
} catch (Exception err) {
log.error("[updateAppointment]", err);
err.printStackTrace();