Skip to content

Commit fac7a3e

Browse files
spacemanspiff2007vstinnerpicnixz
authored andcommitted
pythongh-124832: Add a note to indicate that datetime.now may return the same instant (pythonGH-124834)
* Update datetime.rst * Update datetime.rst replace warning with note * Update Doc/library/datetime.rst Co-authored-by: Victor Stinner <vstinner@python.org> * Update Doc/library/datetime.rst Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --------- (cherry picked from commit 760b1e1) 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>
1 parent 65272a3 commit fac7a3e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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)