/** * @see org.apache.wicket.util.convert.IConverter#convertToString(java.lang.Object, * java.util.Locale) */ @Override public String convertToString(Date value, Locale locale) { DateTime dt = new DateTime(value.getTime(), getTimeZone()); DateTimeFormatter format = getFormat(locale); if (applyTimeZoneDifference) { TimeZone zone = getClientTimeZone(); if (zone != null) { // apply time zone to formatter format = format.withZone(DateTimeZone.forTimeZone(zone)); } } return format.print(dt); }
/** * @see org.apache.wicket.util.convert.IConverter#convertToString(java.lang.Object, * java.util.Locale) */ @Override public String convertToString(Date value, Locale locale) { DateTime dt = new DateTime(value.getTime(), getTimeZone()); DateTimeFormatter format = getFormat(locale); if (applyTimeZoneDifference) { TimeZone zone = getClientTimeZone(); if (zone != null) { // apply time zone to formatter format = format.withZone(DateTimeZone.forTimeZone(zone)); } } return format.print(dt); }
TimeZone zone = getClientTimeZone(); DateTime dateTime;
TimeZone zone = getClientTimeZone(); DateTime dateTime;