Steve, that's exactly what am saying. If any stripping would or should be happen than it must happen before conversion.
bq. JDK Date does not offer a class without time so the convention is to set those fields to zero.
You cannot change those fields to zero without changing the semantics of the instance as you cannot change the timezone to null.
As i said, its surely correct from a very technical point of view, but this is a chance that effects all further date handling. If i were to decide i would leave the bad driver alone. Its not your responsibility. The Oracle driver is probably broken, but the MySQL driver was at least doing this thing right when configured correctly.
bq. why don't you use custom Type mapping to expose the Joda LocalDate instance rather than Date/Calendar?
Three reasons:
* The client application uses the date / calendar instance, the service layer needs real dates without time. * It was working well before * The costs
Make it four:
I don't think Searchs @CalendarBridge(resolution=Resolution.DAY) will work easily with LocalDates.
But i probably look into it nevertheless .
|