[BUG] Chronology DateAndTime class>>now returns incorrect time
Hans-Martin Mosner
hmm at heeg.de
Sat Feb 21 14:47:29 UTC 2004
Ken Causey wrote:
>Yes, I can confirm on Linux that the results of 'DateAndTime now' (even
>with the recent Fix from Brent which helps) varies up to several minutes
>and the variation from system time itself varies.
>
>
The problem is that DateAndTime class>>now incorrectly assumes that the
millisecondClockValue only counts from 0 to 999 within one step of the
totalSeconds.
But the millisecondClockValue just counts up from the system startup,
and is not even synchronized to totalSeconds (so taking
millisecondClockValue\\1000 does not help).
For now, it seems reasonable to exclude the millisecondClockValue from
the DateAndTime class>>now method. It would lose the millisecond
precision, but on the other hand, it would lose the several-minutes-off
imprecision, too :-)
Cheers,
Hans-Martin
More information about the Squeak-dev
mailing list
|