On Mar 31, 3:21 pm, Jorge Ortiz <
jorge.or...@gmail.com> wrote:
> I was on IRC trying to help Clemens with this. The name (MappedDateTime),
> targetSQLType (java.sql.Types.TIMESTAMP), and type (extends
> MappedField[java.util.Date, _]) of this class suggests millisecond precision
> (java.sql.Timestamp and java.util.Date have millisecond precision). However,
> methods jdbcFriendly and real_convertToJDBCFriendly use java.sql.Date, which
> has only day precision.
>
> If the intent is day precision, then calling the class DateTime is probably
> misleading. If the intent is millisecond precision, then we have a bug.
>
> <rant>
>
> Which brings up the larger issue of the brokennes of the Java Date/Time API.
> Java 7 will hopefully be getting a newer/better one, but for those of us
> stuck on Java 5/6, Joda Time is much preferable to the native Date/Time API.
> It more clearly represents foundational concepts like instants (March 31,
> 2009 at 12:15.000pm UTC), partials (March 3 or 7:15pm), intervals (the space
> between two instants), durations (1000 milliseconds), periods (1 month), and
> chronologies (calendar systems). It's also completely immutable (oh, you
> didn't know java.util.Calendar isn't thread-safe? you're lucky to have never
> had to track down that bug).
>
> </rant>
>
> Sigh... it's probably too big of a breaking change to rip out Java Date/Time
> from Mapper and Helpers and replace it with Joda Time, but one can dream...
>
> --j
>
> On Tue, Mar 31, 2009 at 11:58 AM, Clemens Oertel