[issue41083] plistlib can't decode date from year 0

Ronald Oussoren report at bugs.python.org
Tue Jun 23 07:14:07 EDT 2020


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

Year 0 does exist in ISO 8601 though, but that wouldn't help us here as year 0 in that standard is year 1 BCE which is not representable in Python's datetime module.

I'm not sure what we can do about this. The best we could do with plistlib is probably to add an option to either set unrepresentable dates to None or represent those dates as strings.

A more comprehensive fix is to change datetime to be able to represent these dates, but that's a much larger change that likely requires a PEP.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41083>
_______________________________________


More information about the Python-bugs-list mailing list