https://github.com/python/cpython/commit/15daa2f9b3080975758f8c337d5b39bd5e310f44 commit: 15daa2f9b3080975758f8c337d5b39bd5e310f44 branch: 3.13 author: Serhiy Storchaka <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2026-08-06T17:41:17+03:00 summary:
[3.13] gh-76075: Correct `datetime.timestamp` documentation (GH-131202) (GH-155284) (cherry picked from commit 86397cf65d024a39ae85b81d7f611ad4864a78b4) Co-authored-by: Stan Ulbrych <[email protected]> files: M Doc/library/datetime.rst diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index 617a211321066c..b1131f480ff36e 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1475,11 +1475,11 @@ Instance methods: returned by :func:`time.time`. Naive :class:`.datetime` instances are assumed to represent local - time and this method relies on the platform C :c:func:`mktime` - function to perform the conversion. Since :class:`!datetime` - supports wider range of values than :c:func:`mktime` on many - platforms, this method may raise :exc:`OverflowError` or :exc:`OSError` - for times far in the past or far in the future. + time and this method relies on platform C functions to perform + the conversion. Since :class:`!datetime` supports a wider range of + values than the platform C functions on many platforms, this + method may raise :exc:`OverflowError` or :exc:`OSError` for times + far in the past or far in the future. For aware :class:`.datetime` instances, the return value is computed as:: @@ -1492,6 +1492,10 @@ Instance methods: The :meth:`timestamp` method uses the :attr:`.fold` attribute to disambiguate the times during a repeated interval. + .. versionchanged:: 3.6 + This method no longer relies on the platform C :c:func:`mktime` + function to perform conversions. + .. note:: There is no method to obtain the POSIX timestamp directly from a _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
