From f596c5693581f6b061e4874ec557de0ce420b168 Mon Sep 17 00:00:00 2001 From: David K Date: Wed, 9 Oct 2019 14:33:29 +0100 Subject: [PATCH 1/2] Update email.utils documentation Updates documentation around email.utils.parsedate_tz(). Currently, the documentation specifies that when a string without a is timezone passed to parsedate_tz(), the last tuple is returned as ```None```. This is no longer true since Python 3.4 --- Doc/library/email.utils.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/email.utils.rst b/Doc/library/email.utils.rst index 63fae2ab84e213..c56fed519fd54a 100644 --- a/Doc/library/email.utils.rst +++ b/Doc/library/email.utils.rst @@ -117,8 +117,8 @@ of the new API. a 10-tuple; the first 9 elements make up a tuple that can be passed directly to :func:`time.mktime`, and the tenth is the offset of the date's timezone from UTC (which is the official term for Greenwich Mean Time) [#]_. If the input string - has no timezone, the last element of the tuple returned is ``None``. Note that - indexes 6, 7, and 8 of the result tuple are not usable. + has no timezone, the last element of the tuple returned is ``0``, which represents + UTC. Note that indexes 6, 7, and 8 of the result tuple are not usable. .. function:: parsedate_to_datetime(date) From e2de236675cfbcd1ec1c5f0219fea37319f91ebc Mon Sep 17 00:00:00 2001 From: David K Date: Wed, 9 Oct 2019 14:43:02 +0100 Subject: [PATCH 2/2] Update email.utils.rst --- Doc/library/email.utils.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/email.utils.rst b/Doc/library/email.utils.rst index c56fed519fd54a..4d0e920eb0ad29 100644 --- a/Doc/library/email.utils.rst +++ b/Doc/library/email.utils.rst @@ -117,7 +117,7 @@ of the new API. a 10-tuple; the first 9 elements make up a tuple that can be passed directly to :func:`time.mktime`, and the tenth is the offset of the date's timezone from UTC (which is the official term for Greenwich Mean Time) [#]_. If the input string - has no timezone, the last element of the tuple returned is ``0``, which represents + has no timezone, the last element of the tuple returned is ``0``, which represents UTC. Note that indexes 6, 7, and 8 of the result tuple are not usable.