[squeak-dev] Time>addSeconds: ignores nanos ivar value

David T. Lewis lewis at mail.msen.com
Tue Sep 8 23:57:18 UTC 2020


On Mon, Jul 20, 2020 at 01:08:57PM -0700, tim Rowledge wrote:
> Time >addSeconds: completely ignores the nanos ivar value and so
> Time now -> (say)  12:51:47.418205 pm
> send that #addSeconds: 2 -> 12:51:49 pm
> 
> Which is incorrect. Actually *fixing* it seems to be a bit more complex
> than just "add the nanoseconds stuff".
> 
> Should #asSeconds be truncating the seconds and ignoring the nanoseconds?
> That's also an issue for #addTime: and #subtractTime: (wait, no #subtractSeconds: ?)
> 
> Chronology-afficonados assemble!
> 
> tim


In the inbox now, test coverage for the addSeconds: issue is in Chronology-Tests-dtl.24
and a fix is in Chronology-Core-dtl.60.

I have not looked at addTime: yet but it may require similar treatment.

Dave



More information about the Squeak-dev mailing list