[issue1726687] Bug found in datetime for Epoch time = -1

2011-02-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Backported in r88425 (3.1) and r88427 (2.7). -- status: open -> closed ___ Python tracker ___ _

[issue1726687] Bug found in datetime for Epoch time = -1

2011-01-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in revision 87919. If bots are happy about the unit test, this should be backported to 3.1 and 2.7. -- resolution: -> fixed stage: unit test needed -> committed/rejected ___ Python tracker

[issue1726687] Bug found in datetime for Epoch time = -1

2010-06-17 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- priority: normal -> low stage: patch review -> unit test needed versions: +Python 3.1 -Python 2.7 ___ Python tracker ___ __

[issue1726687] Bug found in datetime for Epoch time = -1

2010-06-17 Thread STINNER Victor
STINNER Victor added the comment: > Is this important enough to try to get in 2.7 before rc2? I prefer to not include this patch in 2.7. I don't think that many people have this problem and it can be fixed later. It's too late for 2.7. Should it be fixed in 2.7.1 or only in 3.2 (and maybe in

[issue1726687] Bug found in datetime for Epoch time = -1

2010-06-17 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Is this important enough to try to get in 2.7 before rc2? Victor? -- components: +Extension Modules -None type: -> behavior versions: +Python 3.2 -Python 2.5, Python 3.1 ___ Python tracker

[issue1726687] Bug found in datetime for Epoch time = -1

2010-06-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky -Alexander.Belopolsky ___ Python tracker ___ ___ Pyt

[issue1726687] Bug found in datetime for Epoch time = -1

2010-02-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I wonder: with year bounds being checked in gettmarg() and mktime accepting arbitrary values for the rest of the tm structure members (at least it appears to on my Mac), is it possible trigger "mktime argument out of range"? If it is possible, then a un

[issue1726687] Bug found in datetime for Epoch time = -1

2009-03-20 Thread STINNER Victor
STINNER Victor added the comment: @Amaury: You wrote: << But negative time_t are still not allowed by the Microsoft CRT, the tests fail.>> So I choosed to skip mktime(-1) test if mktime(-2) fails. I don't have Windows to test my patch nor current behaviour. --

[issue1726687] Bug found in datetime for Epoch time = -1

2009-03-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Is the "break" intended in the test function? it seems that this will skip the whole test. Isn't "continue" better? -- ___ Python tracker _

[issue1726687] Bug found in datetime for Epoch time = -1

2009-03-19 Thread STINNER Victor
STINNER Victor added the comment: New version of my fix: - the test doesn't depend on _my_ local anymore: it uses localtime() to get the time tuple in the host local - ignore the test if mktime(-2) raise an OverflowError: avoid the test on Windows Is it now ok for everyone? -- Adde

[issue1726687] Bug found in datetime for Epoch time = -1

2009-01-29 Thread STINNER Victor
STINNER Victor added the comment: My test included in mktime_fix_and_tests.patch has a problem: the timezone is constant and it's mine (GMT+1). I don't know how to write a generic test working on any time zone. I can't use datetime.fromtimestamp() because datetime.fromtimestamp() uses time.m

[issue1726687] Bug found in datetime for Epoch time = -1

2009-01-29 Thread STINNER Victor
STINNER Victor added the comment: > But negative time_t are still not allowed by the Microsoft CRT, > the tests fail. > (...) > is this a bug or a feature request? Linux mktime() supports any timestamp from 1901..2038. Should we limit the timestamp to 1970 just because of Microsoft? Test tm_w

[issue1726687] Bug found in datetime for Epoch time = -1

2008-11-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: on Windows (with Visual Studio), mktime() also sets tm_wday only if successful. But negative time_t are still not allowed by the Microsoft CRT, the tests fail. There are workaround to this - for example python could use techniques si

[issue1726687] Bug found in datetime for Epoch time = -1

2008-11-14 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Can anyone review the last patch? -- keywords: +needs review stage: -> patch review ___ Python tracker <[EMAIL PROTECTED]> ___

[issue1726687] Bug found in datetime for Epoch time = -1

2008-11-10 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: The patch is correct. I tried to use errno, but errno is unchanged on error. Here is a new patch with regression tests. -- nosy: +haypo versions: +Python 2.7, Python 3.1 Added file: http://bugs.python.org/file11982/mktime_fix_and_tes