[issue9063] TZ examples in datetime.rst are incorrect

2010-12-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r87463 (3.2), r87464 (2.7) and r87465 (3.1). -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed versions: +Python 3.1 ___ Python tracker

[issue9063] TZ examples in datetime.rst are incorrect

2010-11-21 Thread Rodrigo Bernardo Pimentel
Changes by Rodrigo Bernardo Pimentel : -- nosy: +rbp ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue9063] TZ examples in datetime.rst are incorrect

2010-07-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: There is nothing we can do about misreporting of UTC offset. Unlike time tuples, datetime objects do not store the DST flag and thus have no means to disambiguate between standard and DST during the hour after the clock is set back for DST to standard

[issue9063] TZ examples in datetime.rst are incorrect

2010-06-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Let's establish what is the correct wall clock sequence around EDT to EST transition: >>> import time >>> def print_time(s): ...tt = time.localtime(s) ...print(time.strftime('%c %z %Z', tt)) x = datetime(2010, 11, 7, 5) >>> s = (x - datetime(197

[issue9063] TZ examples in datetime.rst are incorrect

2010-06-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The result given when Eastern tzinfo object is used is clearly wrong. The timezone shift should not change the actual time, but >>> x == x.astimezone(Eastern) False while >>> x == x.astimezone(Local) True -- _

[issue9063] TZ examples in datetime.rst are incorrect

2010-06-23 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : With python started at the root of the source tree and TZ=US/Eastern in the environment, >>> exec(open('Doc/includes/tzinfo-examples.py').read()) >>> import os >>> os.environ['TZ'] 'US/Eastern' >>> from datetime import * >>> x = datetime(2010, 11, 7, 5