Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-76075: Correctdatetime.timestamp documentation#131202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
pganssle merged 3 commits intopython:mainfromStanFromIreland:mktime-doc
May 20, 2025
Merged
Changes from1 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
NextNext commit
Clean up timestamp docs
  • Loading branch information
@StanFromIreland
StanFromIreland committedMar 13, 2025
commit516fa84b1c7b2dfa1f95ed237937104045501e9b
11 changes: 4 additions & 7 deletionsDoc/library/datetime.rst
View file
Open in desktop
Original file line numberDiff line numberDiff 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

[8]ページ先頭

©2009-2025 Movatter.jp