Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
> The documentation only says “datetime.timestamp” calls “mktime” Indeed. See <https://docs.python.org/3/library/datetime.html#datetime.datetime.timestamp>. This is a documentation bug. Since 3.6 the timestamp does not call mktime. In fact, mktime should not be called anywhere in the datetime module. See <https://github.com/python/cpython/blob/a2314283ff87c65e1745a42c2f2b716b1a209128/Modules/_datetimemodule.c#L5315>. For the explanation of why mktime is not a good API, see PEP 495. On Sun, Oct 29, 2017 at 9:30 PM, Martin Panter <rep...@bugs.python.org> wrote: > > Martin Panter <vadmium...@gmail.com> 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 > <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16>. > > But why is localtime(14400) relevant? The documentation only says > “datetime.timestamp” calls “mktime”, which should be valid since the UTC-5 > timezone offset will give a positive timestamp. Perhaps is this similar to > Issue 29097, probing a date before 1970? > > ---------- > nosy: +martin.panter > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <https://bugs.python.org/issue31894> > _______________________________________ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31894> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com