• Tim Peters's avatar
    SF bug 661086: datetime.today() truncates microseconds. · 5d644dd2
    Tim Peters yazdı
    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.
    5d644dd2
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...