Skip to content

Commit

Permalink
pythongh-124832: Add a note to indicate that datetime.now may retur…
Browse files Browse the repository at this point in the history
…n the same instant (python#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>

---------

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
  • Loading branch information
3 people authored and efimov-mikhail committed Oct 9, 2024
1 parent 320d1ab commit bbe670b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,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()

Expand Down

0 comments on commit bbe670b

Please sign in to comment.