Files
cpython/Modules
Victor Stinner 511491ade0 Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods
of datetime.datetime: microseconds are now rounded to nearest with ties going
to nearest even integer (ROUND_HALF_EVEN), instead of being rounding towards
zero (ROUND_DOWN). It's important that these methods use the same rounding
mode than datetime.timedelta to keep the property:

   (datetime(1970,1,1) + timedelta(seconds=t)) == datetime.utcfromtimestamp(t)

It also the rounding mode used by round(float) for example.

Add more unit tests on the rounding mode in test_datetime.
2015-09-18 14:42:05 +02:00
..
2014-02-04 10:12:18 -05:00
2014-10-28 22:24:46 +01:00
2014-05-11 16:17:02 -07:00
2015-07-02 16:18:38 -05:00
2015-03-18 16:05:18 +01:00
2015-02-09 20:58:52 -05:00
2013-08-01 22:13:30 -07:00
2013-10-26 13:22:08 -04:00
2015-03-02 11:18:40 -05:00
2014-02-04 09:33:05 +01:00