[IronPython] System.TimeSpan can't add time from IronPython

Jan Rouvillain janrou at gmail.com
Fri Nov 6 20:07:53 CET 2009


Hi,

System.TimeSpan does not add time when using Add:

>>> clr.AddReference('System')
>>> span = System.TimeSpan(1,0,0)
>>> span.ToString()
'01:00:00'
>>> hour = System.TimeSpan(1,0,0)
>>> hour.ToString()
'01:00:00'
>>> span.Add(hour)
<System.TimeSpan object at 0x000000000000002B [02:00:00]>
>>> span.ToString()
'01:00:00'

Should have been '02:00:00', because 1 hour is added.


Regards
Jan Rou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20091106/5168b2c1/attachment.html>


More information about the Ironpython-users mailing list