Skip to content

Commit f5fea4d

Browse files
miss-islingtonspacemanspiff2007vstinnerpicnixz
authored
[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 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 20242a4 commit f5fea4d

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
@@ -915,6 +915,10 @@ Other constructors, all class methods:
915915

916916
This function is preferred over :meth:`today` and :meth:`utcnow`.
917917

918+
.. note::
919+
920+
Subsequent calls to :meth:`!datetime.now` may return the same
921+
instant depending on the precision of the underlying clock.
918922

919923
.. classmethod:: datetime.utcnow()
920924

0 commit comments

Comments
 (0)