/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); } }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); }
if (date instanceof DateTime) { if (((DateTime) date).isUtc()) { dates.setUtc(true); } else { dates.setTimeZone(((DateTime) date).getTimeZone());
if (date instanceof DateTime) { if (((DateTime) date).isUtc()) { dates.setUtc(true);
if (date instanceof DateTime) { if (((DateTime) date).isUtc()) { dates.setUtc(true); } else { dates.setTimeZone(((DateTime) date).getTimeZone());
if (date instanceof DateTime) { if (((DateTime) date).isUtc()) { days.setUtc(true); } else { days.setTimeZone(((DateTime) date).getTimeZone());
if (date instanceof DateTime) { if (((DateTime) date).isUtc()) { days.setUtc(true); } else { days.setTimeZone(((DateTime) date).getTimeZone());
/** * Instantiate a new datelist with the same type, timezone and utc settings * as the origList. * @param origList * @return a new empty list. */ private static DateList getDateListInstance(final DateList origList) { final DateList list = new DateList(origList.getType()); if (origList.isUtc()) { list.setUtc(true); } else { list.setTimeZone(origList.getTimeZone()); } return list; }
/** * Instantiate a new datelist with the same type, timezone and utc settings * as the origList. * * @param origList * @return a new empty list. */ private static DateList getDateListInstance(final DateList origList) { final DateList list = new DateList(origList.getType()); if (origList.isUtc()) { list.setUtc(true); } else { list.setTimeZone(origList.getTimeZone()); } return list; }
/** * Instantiate a new datelist with the same type, timezone and utc settings * as the origList. * * @param origList * @return a new empty list. */ public static DateList getDateListInstance(final DateList origList) { final DateList list = new DateList(origList.getType()); if (origList.isUtc()) { list.setUtc(true); } else { list.setTimeZone(origList.getTimeZone()); } return list; }
/** * Instantiate a new datelist with the same type, timezone and utc settings * as the origList. * * @param origList * @return a new empty list. */ private static DateList getDateListInstance(final DateList origList) { final DateList list = new DateList(origList.getType()); if (origList.isUtc()) { list.setUtc(true); } else { list.setTimeZone(origList.getTimeZone()); } return list; }
/** * Instantiate a new datelist with the same type, timezone and utc settings * as the origList. * * @param origList * @return a new empty list. */ public static DateList getDateListInstance(final DateList origList) { final DateList list = new DateList(origList.getType()); if (origList.isUtc()) { list.setUtc(true); } else { list.setTimeZone(origList.getTimeZone()); } return list; }
DateTime dateTime = (DateTime) date; if (dateTime.isUtc()) { this.setUtc(true); } else { this.setTimeZone(dateTime.getTimeZone());
DateTime dateTime = (DateTime) date; if (dateTime.isUtc()) { this.setUtc(true); } else { this.setTimeZone(dateTime.getTimeZone());
DateTime dateTime = (DateTime) date; if (dateTime.isUtc()) { this.setUtc(true); } else { this.setTimeZone(dateTime.getTimeZone());
@Override public boolean toVEvent(final TeamEventDO event, final VEvent vEvent) { if (event.hasRecurrence() == false || event.getRecurrenceExDate() == null) { return false; } final List<Date> exDates = ICal4JUtils.parseCSVDatesAsICal4jDates(event.getRecurrenceExDate(), (false == event.isAllDay()), ICal4JUtils.getUTCTimeZone()); if (CollectionUtils.isEmpty(exDates)) { return false; } for (final Date date : exDates) { final DateList dateList; if (event.isAllDay() == true) { dateList = new DateList(Value.DATE); } else { dateList = new DateList(); dateList.setUtc(true); } dateList.add(date); ExDate exDate; exDate = new ExDate(dateList); vEvent.getProperties().add(exDate); } return true; }