Message236587
I started a large change set to support nanoseconds in the C "pytime" API: see the issue #22117. While working on this change, I noticed that the rounding mode of datetime is currently wrong. Extract of a private patch:
typedef enum {
/* Round towards zero. */
_PyTime_ROUND_DOWN=0,
/* Round away from zero.
For example, used for timeout to wait "at least" N seconds. */
_PyTime_ROUND_UP=1,
/* Round towards minus infinity (-inf).
For example, used for the system clock with UNIX epoch (time_t). */
_PyTime_ROUND_FLOOR=2
} _PyTime_round_t;
I changed Modules/_datetimemodule.c to use _PyTime_ROUND_FLOOR, instead of _PyTime_ROUND_DOWN. |
|
Date |
User |
Action |
Args |
2015-02-25 16:06:35 | vstinner | set | recipients:
+ vstinner, mark.dickinson, belopolsky, r.david.murray, ethan.furman, tbarbugli |
2015-02-25 16:06:34 | vstinner | set | messageid: <1424880394.96.0.064125212034.issue23517@psf.upfronthosting.co.za> |
2015-02-25 16:06:34 | vstinner | link | issue23517 messages |
2015-02-25 16:06:34 | vstinner | create | |
|