[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

Joe Peterson report at bugs.python.org
Sun Jan 30 03:28:46 CET 2011


Joe Peterson <joe at skyrush.com> added the comment:

[just carrying over some info from issue 10939 that is related to this issue]

Here is another manifestation of this issue, related to the local time assumption, but not to DST, per se:

Here is the definition for Europe/London in the unix tz data:

# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
Zone	Europe/London	-0:01:15 -	LMT	1847 Dec  1 0:00s
			 0:00	GB-Eire	%s	1968 Oct 27
			 1:00	-	BST	1971 Oct 31 2:00u
			 0:00	GB-Eire	%s	1996
			 0:00	EU	GMT/BST

So London's local time was always 1 hour ahead of UTC (BST time) from 1968 Oct 27 until 1971 Oct 31 2:00u.

Because of this, Internaldate2tuple() returns the wrong local time (00:00 rather than [the correct] 01:00) in its tuple when input is "01-Jan-1970 00:00:00 +0000" (the epoch).

----------

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


More information about the Python-bugs-list mailing list