private void updateTimeZone(final Property property, final TimeZone timezone) { try { ((DateProperty) property).setTimeZone(timezone); } catch (final ClassCastException e) { try { ((DateListProperty) property).setTimeZone(timezone); } catch (final ClassCastException e2) { if (CompatibilityHints.isHintEnabled( CompatibilityHints.KEY_RELAXED_PARSING)) { // log.warn("Error setting timezone [" + timezone.getID() // + "] on property [" + property.getName() // + "]", e); // } } else { throw e2; } } } } }
private void updateTimeZone(Property property, TimeZone timezone) { try { ((DateProperty) property).setTimeZone(timezone); } catch (ClassCastException e) { try { ((DateListProperty) property).setTimeZone(timezone); } catch (ClassCastException e2) { if (CompatibilityHints.isHintEnabled(CompatibilityHints.KEY_RELAXED_PARSING)) { Logger log = LoggerFactory.getLogger(CalendarBuilder.class); log.warn("Error setting timezone [" + timezone.getID() + "] on property [" + property.getName() + "]", e); } else { throw e2; } } } }
private void updateTimeZone(Property property, TimeZone timezone) { try { ((DateProperty) property).setTimeZone(timezone); } catch (ClassCastException e) { try { ((DateListProperty) property).setTimeZone(timezone); } catch (ClassCastException e2) { if (CompatibilityHints.isHintEnabled(CompatibilityHints.KEY_RELAXED_PARSING)) { Logger log = LoggerFactory.getLogger(CalendarBuilder.class); log.warn("Error setting timezone [" + timezone.getID() + "] on property [" + property.getName() + "]", e); } else { throw e2; } } } }
private void updateTimeZone(Property property, TimeZone timezone) { try { ((DateProperty) property).setTimeZone(timezone); } catch (ClassCastException e) { try { ((DateListProperty) property).setTimeZone(timezone); } catch (ClassCastException e2) { if (CompatibilityHints.isHintEnabled(CompatibilityHints.KEY_RELAXED_PARSING)) { Log log = LogFactory.getLog(CalendarBuilder.class); log.warn("Error setting timezone [" + timezone.getID() + "] on property [" + property.getName() + "]", e); } else { throw e2; } } } }
((DateProperty) property).setTimeZone(timezone);
((DateProperty) property).setTimeZone(timezone);
private void updateTimeZone(final Property property, final TimeZone timezone) { try { ((DateProperty) property).setTimeZone(timezone); } catch (ClassCastException e) { try { ((DateListProperty) property).setTimeZone(timezone); } catch (ClassCastException e2) { if (CompatibilityHints.isHintEnabled(CompatibilityHints.KEY_RELAXED_PARSING)) { error("Error setting timezone [" + timezone.getID() + "] on property [" + property.getName() + "]", e); } else { throw e2; } } } }
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); } }
((DateProperty) property).setTimeZone(timezone); } else if (property instanceof DateListProperty) { ((DateListProperty) property).setTimeZone(timezone);
((DateProperty) property).setTimeZone(timezone); } else if (property instanceof DateListProperty) { ((DateListProperty) property).setTimeZone(timezone);
((DateProperty) property).setTimeZone(timezone);
((DateProperty) property).setTimeZone(timezone);
((DateProperty) property).setTimeZone(timezone); } else if (property instanceof DateListProperty) { ((DateListProperty) property).setTimeZone(timezone);
((DateProperty) property).setTimeZone(timezone); } else if (property instanceof DateListProperty) { ((DateListProperty) property).setTimeZone(timezone);