public TimeZone getTimeZone() { return timeservice.getLocalTimeZone(); }
public TimeZone getLocalTimeZone() { return timeService.getLocalTimeZone(); }
/** * Returns the date set in GMT time * * @param date * The date represented as a long value * * @return Date * The Date object set in GMT time */ public Date getGMTdate(long date) { final Calendar cal = Calendar.getInstance(timeService.getLocalTimeZone()); cal.setTimeInMillis(date); int gmtoffset = cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET); return new Date(date - gmtoffset); }
public static java.util.TimeZone getLocalTimeZone() { org.sakaiproject.time.api.TimeService service = getInstance(); if (service == null) return null; return service.getLocalTimeZone(); }
public static java.util.TimeZone getLocalTimeZone() { org.sakaiproject.time.api.TimeService service = getInstance(); if (service == null) return null; return service.getLocalTimeZone(); }
public static final String convertTimeToString(Time time) { if(time == null) { return null; } SimpleDateFormat sdf = new SimpleDateFormat(CourseSectionImpl.TIME_FORMAT_DATE_TZ); // Time zone from user TimeZone userTz = timeService.getLocalTimeZone(); sdf.setTimeZone(userTz); // Today at 0.00 Calendar date = new GregorianCalendar(userTz); date.set(Calendar.HOUR_OF_DAY, 0); date.set(Calendar.MINUTE, 0); // Add the RawOffset of server, to write REAL TIME in STRING detached from server date.setTimeInMillis(date.getTimeInMillis()+time.getTime()+TimeZone.getDefault().getRawOffset()); sdf.setCalendar(date); return sdf.format(date.getTime()); }
public static final String convertTimeToString(Time time) { if(time == null) { return null; } SimpleDateFormat sdf = new SimpleDateFormat(CourseSectionImpl.TIME_FORMAT_DATE_TZ); // Time zone from user TimeZone userTz = timeService.getLocalTimeZone(); sdf.setTimeZone(userTz); // Today at 0.00 Calendar date = new GregorianCalendar(userTz); date.set(Calendar.HOUR_OF_DAY, 0); date.set(Calendar.MINUTE, 0); // Add the RawOffset of server, to write REAL TIME in STRING detached from server date.setTimeInMillis(date.getTimeInMillis()+time.getTime()+TimeZone.getDefault().getRawOffset()); sdf.setCalendar(date); return sdf.format(date.getTime()); }
TimeZone userTz = timeService.getLocalTimeZone();
TimeZone userTz = timeService.getLocalTimeZone(); TimeZone serverTz = TimeZone.getDefault();
/** * Constructor * * @param attendee * an User, who joins in the event/meeting * @param item * a SignupTrackingItem object * @param meeting * a SignupMeeting object * @param sakaiFacade * a SakaiFacade object */ public AutoReminderEmail(User attendee, SignupTimeslot item, SignupMeeting meeting, String attendeeSiteId, SakaiFacade sakaiFacade) { this.attendee = attendee; this.item = item; this.meeting = meeting; this.setSakaiFacade(sakaiFacade); this.emailReturnSiteId = attendeeSiteId; dateFormat = new SimpleDateFormat("", rb.getLocale()); dateFormat.setTimeZone(sakaiFacade.getTimeService().getLocalTimeZone()); }
formatterProp.setTimeZone(timeService.getLocalTimeZone());
getTime(timeslot.getEndTime()).toStringLocalTime(), getTime(timeslot.getStartTime()).toStringLocalDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(MessageFormat.format(rb.getString("body.meeting.timeslot.timeframe"), paramsTimeframe)); } else { getTime(timeslot.getEndTime()).toStringLocalTime(), getTime(timeslot.getEndTime()).toStringLocalShortDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(MessageFormat.format(rb.getString("body.meeting.crossdays.timeslot.timeframe"), paramsTimeframe));
getTime(timeslot.getEndTime()).toStringLocalTime(), getTime(timeslot.getStartTime()).toStringLocalDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(MessageFormat.format(rb.getString("body.meeting.timeslot.timeframe"), paramsTimeframe) + newline); } else { getTime(timeslot.getEndTime()).toStringLocalTime(), getTime(timeslot.getEndTime()).toStringLocalShortDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(MessageFormat.format(rb.getString("body.meeting.crossdays.timeslot.timeframe"), paramsTimeframe) + newline);
getTime(item.getEndTime()).toStringLocalTime(), getTime(item.getStartTime()).toStringLocalDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(newline + MessageFormat.format(rb.getString("body.attendee.meeting.timeslot"), paramsTimeframe)); getTime(item.getEndTime()).toStringLocalTime(), getTime(item.getEndTime()).toStringLocalShortDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(newline + MessageFormat.format(rb.getString("body.attendee.meeting.crossdays.timeslot"), paramsTimeframe));
getTime(intiatorItem.getRemovedFromTimeslot().get(0).getEndTime()).toStringLocalTime(), getTime(intiatorItem.getRemovedFromTimeslot().get(0).getStartTime()).toStringLocalDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(MessageFormat.format(rb.getString("body.meeting.timeslot.timeframe"), paramsTimeframe)); } else { getTime(intiatorItem.getRemovedFromTimeslot().get(0).getEndTime()).toStringLocalTime(), getTime(intiatorItem.getRemovedFromTimeslot().get(0).getEndTime()).toStringLocalShortDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(MessageFormat.format(rb.getString("body.meeting.crossdays.timeslot.timeframe"), paramsTimeframe));
getTime(meeting.getStartTime()).toStringLocalTime(), getTime(meeting.getEndTime()).toStringLocalTime(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(newline + MessageFormat.format(rb.getString("body.organizer.meeting.timeframe"), paramsTimeframe)); getTime(meeting.getEndTime()).toStringLocalTime(), getTime(meeting.getEndTime()).toStringLocalShortDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(newline + MessageFormat.format(rb.getString("body.organizer.meeting.crossdays.timeframe"), paramsTimeframe1));
getTime(timeslot.getEndTime()).toStringLocalTime(), getTime(timeslot.getStartTime()).toStringLocalDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(newline + MessageFormat.format(rb.getString("body.attendee.meeting.timeslot"), paramsTimeframe)); getTime(timeslot.getEndTime()).toStringLocalTime(), getTime(timeslot.getEndTime()).toStringLocalShortDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(newline + MessageFormat.format(rb.getString("body.attendee.meeting.crossdays.timeslot"), paramsTimeframe));
getTime(item.getAddToTimeslot().getEndTime()).toStringLocalTime(), getTime(item.getAddToTimeslot().getStartTime()).toStringLocalDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(newline + MessageFormat.format(rb.getString("body.attendee.meeting.timeslot"), paramsTimeframe)); getTime(item.getAddToTimeslot().getEndTime()).toStringLocalTime(), getTime(item.getAddToTimeslot().getEndTime()).toStringLocalShortDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(newline + MessageFormat.format(rb.getString("body.attendee.meeting.crossdays.timeslot"), paramsTimeframe));
getTime(item.getAddToTimeslot().getEndTime()).toStringLocalTime(), getTime(item.getAddToTimeslot().getStartTime()).toStringLocalDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(newline + MessageFormat.format(rb.getString("body.attendee.meeting.timeslot"), paramsTimeframe)); getTime(item.getAddToTimeslot().getEndTime()).toStringLocalTime(), getTime(item.getAddToTimeslot().getEndTime()).toStringLocalShortDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(newline + MessageFormat.format(rb.getString("body.attendee.meeting.crossdays.timeslot"), paramsTimeframe));
getTime(timeslot.getEndTime()).toStringLocalTime(), getTime(timeslot.getStartTime()).toStringLocalDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(newline + MessageFormat.format(rb.getString("body.attendee.meeting.timeslot"), paramsTimeframe)); getTime(timeslot.getEndTime()).toStringLocalTime(), getTime(timeslot.getEndTime()).toStringLocalShortDate(), getSakaiFacade().getTimeService().getLocalTimeZone().getID()}; message.append(newline + MessageFormat.format(rb.getString("body.attendee.meeting.crossdays.timeslot"), paramsTimeframe));