[Zope] Weird interaction between int() and DateTime.timeTime

andres@corrada.com andres@corrada.com
Thu, 25 May 2000 13:02:53 -0400


On Thu, May 25, 2000 at 12:56:48PM -0400, Shane Hathaway wrote:
>
> Simple: DateTime has been using floating-point calculations.  I believe
> all of that has been corrected, however, with the new DateTime module,
> available in the public CVS repository.
> 
> Shane
> 

I don't understand how your answer explains the buggy behaviour. If
DateTime.timeTime() returns a float that's okay. Why should a call to it
wrapped with int() return the incorrect answer?

>> t.timeTime() 
953146937.0 
>> int( t.timeTime() ) 
953146936
>> int( 953146937.0 ) 
953146937

------------------------------------------------------
Andres Corrada-Emmanuel   Email: andres@corrada.com
------------------------------------------------------