[issue15873] datetime: add ability to parse RFC 3339 dates and times

Anders Hovmöller report at bugs.python.org
Sat Jul 2 11:52:42 EDT 2016


Anders Hovmöller added the comment:

> 
> By the way, I just discovered, that the way we treat microseconds differs from the strptime one : we are smarter read every digits and smartly round to six, strptime doesn't go that far and just *truncate* to this. Should go that way, for consistency with what strptime does, maybe ?

I'm strongly against silently throwing away data and calling it even. If we want compatibility with strptime then it should be a separate flag like silent_truncate_milliseconds=True. 

On another matter: does the latest proposed code pass the tests in my ISO8601 implementation that I mentioned 2013 (! time flies)?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15873>
_______________________________________


More information about the Python-bugs-list mailing list