[issue37642] timezone allows no offset from range (23:59, 24:00)

Paul Ganssle report at bugs.python.org
Mon Jul 22 10:01:30 EDT 2019


Paul Ganssle <p.ganssle at gmail.com> added the comment:

I have been thinking about this more and I think the two issues (`min` and `max` vs. the incompatibility between C and Python) should be considered two separate issues.

My reasoning is that a change of the value of `timezone.min` and `timezone.max` is not something I'd be comfortable backporting to 3.7, because it has the potential to cause failures in some test suites (for example, `datetime.now(tz=datetime.timezone.max).isoformat()` will start returning a string that does not conform to ISO 8601, which has no support for sub-minute offsets). However, differences between the C and Python implementations are a violation of at least the spirit of PEP 399 and I think it should be backported to 3.7.

----------

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


More information about the Python-bugs-list mailing list