[issue31894] test_timestamp_naive failed on NetBSD

2017-10-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > The documentation only says “datetime.timestamp” calls “mktime” Indeed. See . This is a documentation bug. Since 3.6 the timestamp does not call mktime. In fact, mktime sh

[issue31894] test_timestamp_naive failed on NetBSD

2017-10-29 Thread Martin Panter
Martin Panter added the comment: Are you sure it is a “system” bug? As far as I understand, at least Posix does not require support for local time before 1970. See . But why is localtime(14400) relevant? The do

[issue31894] test_timestamp_naive failed on NetBSD

2017-10-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am not sure. This is a system bug and we often provide work-arounds or even reimplementations of buggy time functions in the time and datetime modules. Whether or not this is something that is worth fixing is a question for the affected NetBSD users. I

[issue31894] test_timestamp_naive failed on NetBSD

2017-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not a datetime expert. What is the better way to skip the test? Is it worth to change the date to say (1970, 3, 9) for which the correct result is obtained on this system? -- ___ Python tracker

[issue31894] test_timestamp_naive failed on NetBSD

2017-10-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I posted a wrong command, but fortunately I am in New York, so it did not matter $ TZ=EST+05EDT,M3.2.0,M11.1.0 python -c 'import time;print(time.localtime(14400)[:])' (1969, 12, 31, 23, 0, 0, 2, 365, 0) -- __

[issue31894] test_timestamp_naive failed on NetBSD

2017-10-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I hate this long form display! Next time please use time.localtime(14400)[:]. Do you agree that this is a system bug? On my Mac, I get $ python -c 'import time; print(time.localtime(14400)[:])' (1969, 12, 31, 23, 0, 0, 2, 365, 0) -- _

[issue31894] test_timestamp_naive failed on NetBSD

2017-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: $ TZ=EST+05EDT,M3.2.0,M11.1.0 ./python -c 'import time; print(time.localtime(14400))' time.struct_time(tm_year=1970, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=3, tm_yday=1, tm_isdst=1) -- ___ Py

[issue31894] test_timestamp_naive failed on NetBSD

2017-10-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't have access to NetBSD and this looks like a bug in the system implementation of localtime. The timestamp method is implemented by probing system localtime in the vicinity of UTC timestamp. What does time.localtime(14400) with these TZ settings?

[issue31894] test_timestamp_naive failed on NetBSD

2017-10-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : $ ./python -m test -vuall test_datetime ... == FAIL: test_timestamp_naive (test.datetimetester.TestDateTime_Pure) -- Trace