For what it's worth, I added the following Calendar code to the end of the
method, which fixed the problem, but I'm thinking there has to be a better
way to handle this.
public Date convertToObject(String value, Locale locale) {
final Pattern pattern = Pattern.compile(REGEX_PATTERN);
if (StringUtils.isNotBlank(value) &&
!pattern.matcher(value).matches()) {
throw new ConversionException("Invalid date format");
}
Date d = super.convertToObject(value, locale);
Calendar c = Calendar.getInstance();
c.setTime(d);
c.add(Calendar.HOUR, 8);
c.set(Calendar.HOUR, 0);
return c.getTime();
}
jpalmer1026 wrote:
>
>
> The DateTime I was referring to is in the
> org.apache.wicket.datetime.DateConverter class, so I have no way of
> modifying it. Any other ideas?
>
>
> Stijn Maller wrote:
>>
>> Looking at your datepattern you should be using LocalDate instead of
>> DateTime, as you don't have a time or a timezone anyway. IMVHO this
>> should
>> solve all your problems.
>>
>
> --
> View this message in context:
> http://www.nabble.com/Converter-Problem-tp24378227p24392993.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://www.nabble.com/Converter-Problem-tp24378227p24399351.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]