/** * {@inheritDoc} */ public Property copy() throws IOException, URISyntaxException, ParseException { final Property copy = super.copy(); ((DateProperty) copy).timeZone = timeZone; ((DateProperty) copy).setValue(getValue()); return copy; } }
/** * {@inheritDoc} */ public Property copy() throws IOException, URISyntaxException, ParseException { final Property copy = super.copy(); ((DateProperty) copy).timeZone = timeZone; ((DateProperty) copy).setValue(getValue()); return copy; } }
/** * {@inheritDoc} */ public Property copy() throws IOException, URISyntaxException, ParseException { final Property copy = super.copy(); ((DateProperty) copy).timeZone = timeZone; ((DateProperty) copy).setValue(getValue()); return copy; } }
/** * {@inheritDoc} */ public Property copy() throws IOException, URISyntaxException, ParseException { final Property copy = super.copy(); ((DateProperty) copy).timeZone = timeZone; ((DateProperty) copy).setValue(getValue()); return copy; } }
/** * {@inheritDoc} */ public Property copy() throws IOException, URISyntaxException, ParseException { final Property copy = super.copy(); ((DateProperty) copy).timeZone = timeZone; ((DateProperty) copy).setValue(getValue()); return copy; } }
static void correctTzParameterFrom(DateProperty property) { if (property.getValue() != null && property.getValue().endsWith("Z")) { property.getParameters().removeAll(Parameter.TZID); return; } if (property.getParameter(Parameter.TZID) != null) { String newTimezone = getCorrectedTimezoneFromTzParameter(property); String value = property.getValue(); correctTzParameter(property, newTimezone); if (newTimezone != null) { property.setTimeZone(TIMEZONE_REGISTRY.getTimeZone(newTimezone)); try { property.setValue(value); } catch (ParseException e) { LOG.warn("Failed to reset property value", e); } } else { property.setUtc(true); } } }
static void correctTzParameterFrom(DateProperty property) { if (property.getValue() != null && property.getValue().endsWith("Z")) { property.getParameters().removeAll(Parameter.TZID); return; } if (property.getParameter(Parameter.TZID) != null) { String newTimezone = getCorrectedTimezoneFromTzParameter(property); String value = property.getValue(); correctTzParameter(property, newTimezone); if (newTimezone != null) { property.setTimeZone(TIMEZONE_REGISTRY.getTimeZone(newTimezone)); try { property.setValue(value); } catch (ParseException e) { LOG.warn("Failed to reset property value", e); } } else { property.setUtc(true); } } }
static void correctTzParameterFrom(DateProperty property) { if (property.getValue() != null && property.getValue().endsWith("Z")) { property.getParameters().removeAll(Parameter.TZID); return; } if (property.getParameter(Parameter.TZID) != null) { String newTimezone = getCorrectedTimezoneFromTzParameter(property); String value = property.getValue(); correctTzParameter(property, newTimezone); if (newTimezone != null) { property.setTimeZone(TIMEZONE_REGISTRY.getTimeZone(newTimezone)); try { property.setValue(value); } catch (ParseException e) { LOG.warn("Failed to reset property value", e); } } else { property.setUtc(true); } } }
/** Make date time based on ical property * * @param val * @return BwDateTime * @throws CalFacadeException */ public static BwDateTime makeBwDateTime(final DateProperty val) throws CalFacadeException { Parameter par = getIcalParameter(val, "VALUE"); BwDateTime bwdt = makeBwDateTime((par != null) && (par.equals(Value.DATE)), val.getValue(), getTzid(val)); par = getIcalParameter(val, "RANGE"); if (par != null) { /* XXX What do I do with it? */ bwdt.range = par.getValue(); } return bwdt; }