[issue15443] datetime module has no support for nanoseconds
Marc-Andre Lemburg
report at bugs.python.org
Wed Jul 25 13:40:34 CEST 2012
Marc-Andre Lemburg <mal at egenix.com> added the comment:
Alexander Belopolsky wrote:
>
> Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:
>
> On Wed, Jul 25, 2012 at 4:17 AM, Marc-Andre Lemburg <report at bugs.python.org> wrote:
>> ... full C double precision for the time part of a timestamp,
>> which covers nanoseconds just fine.
>
> No, it does not:
>
>>>> import time
>>>> t = time.time()
>>>> t + 5e-9 == t
> True
>
> In fact, C double precision is barely enough to cover microseconds:
>
>>>> t + 1e-6 == t
> False
>
>>>> t + 1e-7 == t
> True
I was referring to the use of a C double to store the time part
in mxDateTime. mxDateTime uses the C double to store the number of
seconds since midnight, so you don't run into the Unix ticks value
range problem you showcased above.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15443>
_______________________________________
More information about the Python-bugs-list
mailing list