Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1485,13 +1485,6 @@ Instance methods:
instance. The return value is a :class:`float` similar to that
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.

For aware :class:`.datetime` instances, the return value is computed
as::

Expand All @@ -1503,6 +1496,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
Expand Down
Loading