From 433e994666da125248feee72021fc5e3ad0c8cc1 Mon Sep 17 00:00:00 2001 From: Oleg Iarygin Date: Mon, 16 Jan 2023 00:36:31 +0400 Subject: [PATCH] gh-101041: Fix a misspelled name of `utctimetuple` in a doc warning (GH-101042) (cherry picked from commit 8e9d08b062bbabfe439bc73f82e3d7bb3800189e) Co-authored-by: Oleg Iarygin --- Doc/library/datetime.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index f222ec9bb771a8..e23d2a96cc26d4 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1342,7 +1342,7 @@ Instance methods: Because naive ``datetime`` objects are treated by many ``datetime`` methods 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 ``datetime.replace(tzinfo=timezone.utc)`` to make it aware, at which point you can use :meth:`.datetime.timetuple`.