Bugs item #1560794, was opened at 2006-09-18 16:53 Message generated for change (Comment added) made by pboddie You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1560794&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Knut Aksel Røysland (knutroy) Assigned to: Nobody/Anonymous (nobody) Summary: strftime('%z') behaving differently with/without time arg. Initial Comment: According to the documentation, time.strftime will use time.localtime, when no time tuple is provided as argument. So, I wonder if it is desired behavior that %z returns different values in the following two cases: Python 2.4.3 (#2, Apr 27 2006, 14:43:58) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.strftime('%Y-%m-%dT%H:%M:%S%z') '2006-09-18T16:12:05+0200' >>> time.strftime('%Y-%m-%dT%H:%M:%S%z', time.localtime()) '2006-09-18T16:12:05+0000' The first behavior is what I am looking for. I realize that %z is not documented, so maybe it should be rejected instead of giving surprising results, like above. This behavior is observed on different Linux systems under different versions of Python, e.g. on Ubuntu Dapper Drake running Python 2.4.3. ---------------------------------------------------------------------- Comment By: Paul Boddie (pboddie) Date: 2007-02-24 01:33 Message: Logged In: YES user_id=226443 Originator: NO See patch #1667546 and related bug #1493676 (with discussion). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1560794&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com