[issue1647654] No obvious and correct way to get the time zone offset

Alexander Belopolsky report at bugs.python.org
Fri Jun 4 20:34:03 CEST 2010

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

Issue #1667546 is more ambitious than this.  I propose a very simple patch which makes tm_zone and tm_gmtoff available on systems with HAVE_STRUCT_TM_TM_ZONE defined (Linux and BSD variants). The additional fields are only allowed as attributes so len(time.localtime()) is still the same.  This choice allows to get access to extra fields without breaking code that relies on the size of timetuple.

The patch needs documentation updates which I will add if the idea is well received.

keywords: +patch
nosy: +mark.dickinson
stage:  -> patch review
versions: +Python 3.2 -Python 2.7, Python 3.1
Added file: http://bugs.python.org/file17554/issue1647654.diff

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list