private void copyDateProperty(ContentValues c, String dbName, String dbTzName, DateProperty date) { if (dbName != null && date.getDate() != null) { c.put(dbName, date.getDate().getTime()); // ms since epoc in GMT if (dbTzName != null) { if (date.isUtc() || date.getTimeZone() == null) c.put(dbTzName, "UTC"); else c.put(dbTzName, date.getTimeZone().getID()); } } }
@Override public void applyTo(DateProperty element) { TzHelper.correctTzParameterFrom(element); if (!element.isUtc() || element.getParameter(Parameter.TZID) == null) { return; } element.getParameters().removeAll(Parameter.TZID); element.setUtc(true); }
@Override public void applyTo(DateProperty element) { TzHelper.correctTzParameterFrom(element); if (!element.isUtc() || element.getParameter(Parameter.TZID) == null) { return; } element.getParameters().removeAll(Parameter.TZID); element.setUtc(true); }
@Override public void applyTo(DateProperty element) { TzHelper.correctTzParameterFrom(element); if (!element.isUtc() || element.getParameter(Parameter.TZID) == null) { return; } element.getParameters().removeAll(Parameter.TZID); element.setUtc(true); }
setUtc(isUtc());
/** * Updates the timezone associated with the property's value. If the specified timezone is equivalent to UTC any * existing TZID parameters will be removed. Note that this method is only applicable where the current date is an * instance of <code>DateTime</code>. For all other cases an <code>UnsupportedOperationException</code> will be * thrown. * * @param timezone */ private void updateTimeZone(final TimeZone timezone) { this.timeZone = timezone; if (timezone != null) { if (getDate() != null && !(getDate() instanceof DateTime)) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } if (getDate() != null) { ((DateTime) getDate()).setTimeZone(timezone); } getParameters().replace(new TzId(timezone.getID())); } else { // use setUtc() to reset timezone.. setUtc(isUtc()); } }
/** * Updates the timezone associated with the property's value. If the specified timezone is equivalent to UTC any * existing TZID parameters will be removed. Note that this method is only applicable where the current date is an * instance of <code>DateTime</code>. For all other cases an <code>UnsupportedOperationException</code> will be * thrown. * * @param timezone */ private void updateTimeZone(final TimeZone timezone) { this.timeZone = timezone; if (timezone != null) { if (getDate() != null && !(getDate() instanceof DateTime)) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } if (getDate() != null) { ((DateTime) getDate()).setTimeZone(timezone); } getParameters().replace(new TzId(timezone.getID())); } else { // use setUtc() to reset timezone.. setUtc(isUtc()); } }
/** * Updates the timezone associated with the property's value. If the specified timezone is equivalent to UTC any * existing TZID parameters will be removed. Note that this method is only applicable where the current date is an * instance of <code>DateTime</code>. For all other cases an <code>UnsupportedOperationException</code> will be * thrown. * * @param timezone */ private void updateTimeZone(final TimeZone timezone) { this.timeZone = timezone; if (timezone != null) { if (getDate() != null && !(getDate() instanceof DateTime)) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } if (getDate() != null) { ((DateTime) getDate()).setTimeZone(timezone); } getParameters().replace(new TzId(timezone.getID())); } else { // use setUtc() to reset timezone.. setUtc(isUtc()); } }
/** * Updates the timezone associated with the property's value. If the specified timezone is equivalent to UTC any * existing TZID parameters will be removed. Note that this method is only applicable where the current date is an * instance of <code>DateTime</code>. For all other cases an <code>UnsupportedOperationException</code> will be * thrown. * * @param timezone */ private void updateTimeZone(final TimeZone timezone) { this.timeZone = timezone; if (timezone != null) { if (getDate() != null && !(getDate() instanceof DateTime)) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } if (getDate() != null) { ((DateTime) getDate()).setTimeZone(timezone); } getParameters().replace(new TzId(timezone.getID())); } else { // use setUtc() to reset timezone.. setUtc(isUtc()); } }
if (tzid != null) { addIcalParameter(dtEnd, tzid); } else if (dtStart.isUtc()) { dtEnd.setUtc(true);
getParameters()); if (isUtc()) { ParameterValidator.getInstance().assertNone(Parameter.TZID, getParameters());
getParameters()); if (isUtc()) { ParameterValidator.getInstance().assertNone(Parameter.TZID, getParameters());
getParameters()); if (isUtc()) { ParameterValidator.getInstance().assertNone(Parameter.TZID, getParameters());
getParameters()); if (isUtc()) { ParameterValidator.getInstance().assertNone(Parameter.TZID, getParameters());
getParameters()); if (isUtc()) { ParameterValidator.getInstance().assertNone(Parameter.TZID, getParameters());