From: Gavin_King/Cirrus%<CI...@ci...> - 2002-02-19 08:11:27
|
>Bottom line for Hibernate: >1. we could do nothing, and leave it to the user and the jdbc driver >2. we could get the timezone from the Date with getTimezoneOffset() >and force the time portion of the Date to midnight in that timezone >3. we could use setDate(int parameterIndex, java.sql.Date x, Calendar cal) >but not all drivers have it (plus, we'd have to construct the Claendar >from the getTimezoneOffset() since jave.util.Date won't give it up)? >I'd vote for 2 or 1 in that order, but I'd love to hear what others >think. Which of those choices best obeys principle-of-least-astonishment? Also, if we started messing with times inside the Date, might we clobber normalization already done by the application? I'm pretty happy if: 1. It works for the default timezone 2. applications that need multiple timezones can handle normalization themselves Am I way off base? |