On Jan 2, 2008, at 2:36 PM, Galen Rhodes wrote:

Hmmmmm. Well. No. I think you're assuming that the dates are stored as floating point or double precision real values. Under WO 5.x the NSTimestamp is descended from java.util.Date which stores the time as a long integer representing the milliseconds from the standard epoch. I believe GregorianCalendar does as well. And I believe this is the same way that MySQL stores them too.

So, in that case, there is definitely a difference between 23:59:59.999 and 00:00:00.000. All comparisons (and math) are done using the long millisecond value.

Oh, gag. That means subtle rounding errors with Oracle and FrontBase when using dates. Oh joy. Because its quite possible to get/store 23:59:59.9999 in the database. Does that mean Monday becomes Tuesday?

 Stupid Java architects.

I still say that endOfDay() is still wrong, you shouldn't assume what the internal format of the number is, and you shouldn't be using <=, only <. It might work, but only because the Java implementation is broken in a different way.

 Pierce
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to