mirror of
https://github.com/python/cpython.git
synced 2025-10-03 21:55:41 +00:00
gh-101041: Fix a misspelled name of utctimetuple
in a doc warning (GH-101042)
(cherry picked from commit 8e9d08b062
)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
This commit is contained in:
parent
db65a326a4
commit
1998ea69c7
1 changed files with 1 additions and 1 deletions
|
@ -1350,7 +1350,7 @@ Instance methods:
|
||||||
|
|
||||||
Because naive ``datetime`` objects are treated by many ``datetime`` methods
|
Because naive ``datetime`` objects are treated by many ``datetime`` methods
|
||||||
as local times, it is preferred to use aware datetimes to represent times
|
as local times, it is preferred to use aware datetimes to represent times
|
||||||
in UTC; as a result, using ``utcfromtimetuple`` may give misleading
|
in UTC; as a result, using :meth:`datetime.utctimetuple` may give misleading
|
||||||
results. If you have a naive ``datetime`` representing UTC, use
|
results. If you have a naive ``datetime`` representing UTC, use
|
||||||
``datetime.replace(tzinfo=timezone.utc)`` to make it aware, at which point
|
``datetime.replace(tzinfo=timezone.utc)`` to make it aware, at which point
|
||||||
you can use :meth:`.datetime.timetuple`.
|
you can use :meth:`.datetime.timetuple`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue