Author vstinner
Recipients belopolsky, ethan.furman, mark.dickinson, r.david.murray, tbarbugli, vstinner
Date 2015-02-25.16:06:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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. */
    /* Round away from zero.
       For example, used for timeout to wait "at least" N seconds. */
    /* Round towards minus infinity (-inf).
       For example, used for the system clock with UNIX epoch (time_t). */
} _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:35vstinnersetrecipients: + vstinner, mark.dickinson, belopolsky, r.david.murray, ethan.furman, tbarbugli
2015-02-25 16:06:34vstinnersetmessageid: <>
2015-02-25 16:06:34vstinnerlinkissue23517 messages
2015-02-25 16:06:34vstinnercreate