JoeKuan <[email protected]> added the comment:
I don't think it is to do with the underlying C mktime. Because it works fine
with 00:59:58 and 01:00:00, 1, Jan 1970. It is to do with some specific value
-1 in the internal code of time.mktime
Here is the C code.
int main(int argc, char *argv[]) {
struct tm aTime = { 58, 59, 0, 1, 0, 70, 0, 0, 0, 0 };
time_t mTime = mktime(&aTime);
printf("%s\n", ctime(&mTime));
aTime.tm_sec = 59;
mTime = mktime(&aTime);
printf("%s\n", ctime(&mTime));
aTime.tm_sec = 0;
aTime.tm_min = 0;
aTime.tm_hour = 1;
mTime = mktime(&aTime);
printf("%s\n", ctime(&mTime));
}
-------------------------------------------------------
Output from the same machine which gives the python error message
Thu Jan 1 00:59:58 1970
Thu Jan 1 00:59:59 1970
Thu Jan 1 01:00:00 1970
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11850>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com