TemporalConvertor can change a date

Description

When calling the TemporalConvertor to convert from a java.util.Date to a java.sql.Date it is possible for the date to be changed if it is in a TimeZone to the east of GMT.

public void testDatetoDate() throws Exception
{
DateFormat df = new SimpleDateFormat("yyyy-dd-MM");
df.setTimeZone( TimeZone.getTimeZOne("BST"));
Date date = df.parse("2009-28-06");
assertNotNull(factory.createConverter(Date.class, java.sql.Date.class, null));

java.sql.Date output = (java.sql.Date) factory.createConverter(Date.class, java.sql.Date.class, null).convert(date, java.sql.Date.class);

assertEquals("2009-06-28", output);
}

will currently fail

Environment

None

Status

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Affects versions

13-beta

Priority

High
Configure