Skip to content

Commit 382ee1c

Browse files
miss-islingtonspacemanspiff2007vstinnerpicnixz
authored
[3.12] gh-124832: Add a note to indicate that datetime.now may return the same instant (GH-124834) (#125146)
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 760b1e1) Co-authored-by: spacemanspiff2007 <[email protected]> Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 65272a3 commit 382ee1c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/library/datetime.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,10 @@ Other constructors, all class methods:
896896

897897
This function is preferred over :meth:`today` and :meth:`utcnow`.
898898

899+
.. note::
900+
901+
Subsequent calls to :meth:`!datetime.now` may return the same
902+
instant depending on the precision of the underlying clock.
899903

900904
.. classmethod:: datetime.utcnow()
901905

0 commit comments

Comments
 (0)