Message284561
| Author |
vstinner |
| Recipients |
belopolsky, vstinner |
| Date |
2017年01月03日.13:57:08 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1483451829.62.0.434619516952.issue29140@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
When the time is folded, time_hash() uses DATE_xxx() macros, instead of TIME_xxx() macros, and so reads microseconds from the wrong bytes.
Bug introduced by the implementation of the PEP 495 (Local Time Disambiguation).
#define PyDateTime_DATE_GET_MICROSECOND(o) \
((((PyDateTime_DateTime*)o)->data[7] << 16) | \
(((PyDateTime_DateTime*)o)->data[8] << 8) | \
((PyDateTime_DateTime*)o)->data[9])
#define PyDateTime_TIME_GET_MICROSECOND(o) \
((((PyDateTime_Time*)o)->data[3] << 16) | \
(((PyDateTime_Time*)o)->data[4] << 8) | \
((PyDateTime_Time*)o)->data[5])
Attached patch fixes time_hash().
I guess that it's a dummy copy-paste issue. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017年01月03日 13:57:09 | vstinner | set | recipients:
+ vstinner, belopolsky |
| 2017年01月03日 13:57:09 | vstinner | set | messageid: <1483451829.62.0.434619516952.issue29140@psf.upfronthosting.co.za> |
| 2017年01月03日 13:57:09 | vstinner | link | issue29140 messages |
| 2017年01月03日 13:57:09 | vstinner | create |
|