This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients allo, docs@python, tim.peters
Date 2013-08-24.22:14:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1377382469.42.0.295230732266.issue18827@psf.upfronthosting.co.za>
In-reply-to
Content
The docs look correct to me.  For example,

>>> from datetime import *
>>> td = datetime.now() - datetime(1,1,1)
>>> td
datetime.timedelta(735103, 61756, 484000)
>>> td.total_seconds()
63512960956.484
                                                                ^
What the docs say match that output:

>>> (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 1e6
63512960956.484

Your suggestion's output:

>>> (td.microseconds / 1e6 + (td.seconds + td.days * 24 * 3600) * 10**6)
6.3512960956e+16

You're multiplying the number seconds by a million - not a good idea ;-)
History
Date User Action Args
2013-08-24 22:14:29tim.peterssetrecipients: + tim.peters, docs@python, allo
2013-08-24 22:14:29tim.peterssetmessageid: <1377382469.42.0.295230732266.issue18827@psf.upfronthosting.co.za>
2013-08-24 22:14:29tim.peterslinkissue18827 messages
2013-08-24 22:14:29tim.peterscreate