[BUG][FIX] Time and TimeStamp printsString prints seconds as a Fraction

Brent Pinkney brent.pinkney at aircom.co.za
Tue Feb 17 08:41:16 UTC 2004


Regrettably, a nasty bug has slipt through the Chronology tests:

The TimeStamp class now inherits its behavior from the ANSI DateAndTime
class which has nanosecond precision. It uses the refactored Time class
to implement #printString which has traditionally only had second
precision.

During the refactoring Time print has not preserved this invariant and
if 'TimeStamp now' evaluates to a DateAndTime with a fractional second
component, the Time and TimeStamp printStrings will print as
  		16 February 2004 9:36:(23979/500) am
instead of:
  		16 February 2004 9:36:47 am

The attached change set with a wee patch to
Time>>#print24:showSeconds:on: fixes this.

All 382 Chronology tests still complete successfully.

Brent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timeSecondsPrintOn-brp.1.cs.gz
Type: application/x-gzip
Size: 527 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040217/d3e6ee77/timeSecondsPrintOn-brp.1.cs.bin


More information about the Squeak-dev mailing list