Message249796
| Author |
tim.peters |
| Recipients |
aconrad, belopolsky, larry, mark.dickinson, python-dev, r.david.murray, tbarbugli, tim.peters, trcarden, vivanov, vstinner |
| Date |
2015年09月04日.17:35:08 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1441388109.36.0.976663108602.issue23517@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
FYI, that invariant failed for me just now under the released 3.4.3 too:
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import *
>>> E = datetime(1970,1,1,tzinfo=timezone.utc)
>>> s = -1/2**7
>>> datetime.fromtimestamp(s, timezone.utc)
datetime.datetime(1969, 12, 31, 23, 59, 59, 992187, tzinfo=datetime.timezone.utc)
>>> E + timedelta(seconds=s)
datetime.datetime(1969, 12, 31, 23, 59, 59, 992188, tzinfo=datetime.timezone.utc)
It's an exactly-tied rounding case for the exactly-representable-in-binary s = -0.0078125. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年09月04日 17:35:09 | tim.peters | set | recipients:
+ tim.peters, mark.dickinson, belopolsky, vstinner, larry, r.david.murray, aconrad, vivanov, python-dev, tbarbugli, trcarden |
| 2015年09月04日 17:35:09 | tim.peters | set | messageid: <1441388109.36.0.976663108602.issue23517@psf.upfronthosting.co.za> |
| 2015年09月04日 17:35:09 | tim.peters | link | issue23517 messages |
| 2015年09月04日 17:35:08 | tim.peters | create |
|