/** * {@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); } } }
private void initDateProp(final DateProperty dt, final TimeZoneRegistry tzreg) throws CalFacadeException { try { String tzid = getTzid(); ParameterList pl = dt.getParameters(); if (getDateType()) { pl.add(Value.DATE); } if (tzid != null) { dt.setTimeZone(tzreg.getTimeZone(tzid)); } dt.setValue(getDtval()); } catch (Throwable t) { throw new CalFacadeException(t); } }