[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

Alexander Belopolsky report at bugs.python.org
Thu Jul 8 02:06:08 CEST 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

C code changes eliminating round-trips between timdelta and int offsets committed in r82642 and Python code changes committed to sandbox in r82641.

Now the requested behavior change is easy and I am about +0.5 on relaxing the offset checks to allow seconds in the offsets and about +0.1 on removing the checks altogether and allowing arbitrary timedeltas even over 1 day.

The only substantive question in my mind is how to handle printing in formats like %z which only provide 4 digits for UTC offset.  Two options seem reasonable: a) truncate sub-minute offsets; and b) follow RFC 3339 recommendation and translate the time into the nearest whole-minute timezone.

I am slightly is favor of (a), but this whole problem may be a reason to reject this RFE.

----------
keywords: +easy -patch
priority: normal -> low
stage: commit review -> unit test needed

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


More information about the Python-bugs-list mailing list