You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Steve Flasby <st...@flasby.org> on 2009/04/23 09:47:39 UTC
java.sql.Timestamp converter bug in 1.4RC2
Chaps,
Ive just noticed that SqlTimestampConverter appears to be broken.
I expected it to produce a Date/Time as output, but it only produces
a time. SqlTimeConverter prints a simple time as I expected.
Looking in the code SqlTimestampConverter::convertToString uses:
DateFormat format = DateFormat.getTimeInstance(dateFormat, locale);
when I think it should say:
DateFormat format = DateFormat.getDateTimeInstance(DateFormat.SHORT,
DateFormat.SHORT, locale);
instead.
convertToObject would need a corresponding change to:
DateFormat format = DateFormat.getDateTimeInstance(DateFormat.SHORT,
DateFormat.SHORT, locale);
Am I right or is this behavior by design?
Cheers - Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: java.sql.Timestamp converter bug in 1.4RC2
Posted by Igor Vaynberg <ig...@gmail.com>.
sounds like a bug, please open a jira issue.
-igor
On Thu, Apr 23, 2009 at 12:47 AM, Steve Flasby <st...@flasby.org> wrote:
> Chaps,
>
> Ive just noticed that SqlTimestampConverter appears to be broken.
> I expected it to produce a Date/Time as output, but it only produces
> a time. SqlTimeConverter prints a simple time as I expected.
>
> Looking in the code SqlTimestampConverter::convertToString uses:
>
> DateFormat format = DateFormat.getTimeInstance(dateFormat, locale);
>
> when I think it should say:
>
> DateFormat format = DateFormat.getDateTimeInstance(DateFormat.SHORT,
> DateFormat.SHORT, locale);
>
> instead.
>
> convertToObject would need a corresponding change to:
> DateFormat format = DateFormat.getDateTimeInstance(DateFormat.SHORT,
> DateFormat.SHORT, locale);
>
>
>
> Am I right or is this behavior by design?
>
>
> Cheers - Steve
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org