Paul Ganssle <p.gans...@gmail.com> added the comment: > Not if the time is associated with a particular day. Imagine implementing > datetime.fromisoformat by separately calling date.fromisoformat and > time.fromisoformat. The date will be off by one day if you naively rounded > 2017-12-18 23:59 “up” to 2017-12-18 00:00.
Yes, I suppose this is a problem if you implement it that way. Seems like a somewhat moot point, but I think any decision about rounding should probably be driven by what people are expecting more than by how it is implemented. That said, I can see a good case for truncation *and* rounding up for something like '2016-12-31T23:59:59.999999999'. Rounding up to '2017-01-01' is certainly the closest whole millisecond to round to, *but* often people expressing a "23:59:59.9999999" are trying to actually express "the last possible moment *before* 00:00". ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue15873> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com