[BUG] Chronology DateAndTime class>>now returns incorrect time

Avi Bryant avi at beta4.com
Sun Feb 22 02:38:22 UTC 2004


On Feb 21, 2004, at 1:07 PM, David T. Lewis wrote:

> Nanosecond precision:
> I think that the point of DateAndTime is in part to provide an ANSI
> compliant protocol. It really doesn't matter whether the result is
> accurate to nanosecond precision, but it probably does matter that
> DateAndTime is precise (as opposed to accurate) to nanosecond
> precision. I'm not saying that the ANSI protocol necessarily is a
> great way to express time, but if we're going to provide the protocol,
> let's not do it almost right.
>
> So it's an implementation bug, not a design bug, and the Way of
> Least Work is to fix the implementation bug.

Except that ANSI doesn't specify nanosecond precision.  AFAICT, the 
smallest unit of time referred to by ANSI is the second.  There's no 
need for nanoseconds.  Sure, it would be nice, but I'm not willing to 
sacrifice 15 minutes of accuracy to gain greater precision!  At the 
moment it would be far more accurate for #nanoSecond to simply return a 
large random number... at which point I really do think that yes, this 
was a design bug.




More information about the Squeak-dev mailing list