summaryrefslogtreecommitdiffstats
path: root/Modules/zlibmodule.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-01-02 16:32:54 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-01-02 16:32:54 (GMT)
commit5d644dd25ac3100d0e8bc795ae57a6b8061fefd4 (patch)
treecad48fa944d2b18ca8f6b582dbf70451bb4333b3 /Modules/zlibmodule.c
parente55534665f95a2cf8c866803e847573607d44798 (diff)
downloadcpython-5d644dd25ac3100d0e8bc795ae57a6b8061fefd4.zip
cpython-5d644dd25ac3100d0e8bc795ae57a6b8061fefd4.tar.gz
cpython-5d644dd25ac3100d0e8bc795ae57a6b8061fefd4.tar.bz2
SF bug 661086: datetime.today() truncates microseconds.
On Windows, it was very common to get microsecond values (out of .today() and .now()) of the form 480999, i.e. with three trailing nines. The platform precision is .001 seconds, and fp rounding errors account for the rest. Under the covers, that 480999 started life as the fractional part of a timestamp, like .4809999978. Rounding that times 1e6 cures the irritation. Confession: the platform precision isn't really .001 seconds. It's usually worse. What actually happens is that MS rounds a cruder value to a multiple of .001, and that suffers its own rounding errors. A tiny bit of refactoring added a new internal utility to round doubles.
Diffstat (limited to 'Modules/zlibmodule.c')
0 files changed, 0 insertions, 0 deletions