[Python-checkins] CVS: python/nondist/sandbox/datetime datetime.py,1.37,1.38 test_datetime.py,1.23,1.24

M.-A. Lemburg mal@lemburg.com
2002年3月04日 10:13:29 +0100


Tim Peters wrote:
>> Update of /cvsroot/python/python/nondist/sandbox/datetime
>> 2. Not so shallow. When the tzoffsets didn't match, it reverted to
> comparing timestamps, but an IEEE double doesn't have enough
> precision to avoid mapping distinct datetimes onto the same timestamp.
> It takes about 38 bits to distinguish the individual seconds across
> 10000 years, leaving only about 53-38 = 15 bits to distinguish the
> microseconds. As a result, non-equal datetimes could compare equal,
> especially for years near MAXYEAR.

Funny, how you guys run into the same problems I had at the 
time ;-)
-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/

AltStyle によって変換されたページ (->オリジナル) /