mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.13] gh-124832: Add a note to indicate that datetime.now
may return the same instant (GH-124834) (#125145)
gh-124832: Add a note to indicate that `datetime.now` may return the same instant (GH-124834)
* Update datetime.rst
* Update datetime.rst
replace warning with note
* Update Doc/library/datetime.rst
* Update Doc/library/datetime.rst
---------
(cherry picked from commit 760b1e103a
)
Co-authored-by: spacemanspiff2007 <10754716+spacemanspiff2007@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
parent
20242a437c
commit
f5fea4dec6
1 changed files with 4 additions and 0 deletions
|
@ -915,6 +915,10 @@ Other constructors, all class methods:
|
|||
|
||||
This function is preferred over :meth:`today` and :meth:`utcnow`.
|
||||
|
||||
.. note::
|
||||
|
||||
Subsequent calls to :meth:`!datetime.now` may return the same
|
||||
instant depending on the precision of the underlying clock.
|
||||
|
||||
.. classmethod:: datetime.utcnow()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue