From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 26 Apr 2023 20:55:39 +0000 (-0700) Subject: [3.11] gh-94300: Update datetime.strptime documentation (GH-95318) (#103785) X-Git-Tag: v3.11.4~158 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=410c2ce9565659ece48d41b47c78bc9afd7bcbdc;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-94300: Update datetime.strptime documentation (GH-95318) (#103785) gh-94300: Update datetime.strptime documentation (GH-95318) The new wording better reflects the cases where `datetime.strptime` differs from` time.strptime`. --------- (cherry picked from commit 5b404d6cad2bf53295fdf96305f95efe1ea0174e) Co-authored-by: Howie Zhao Co-authored-by: Paul Ganssle Co-authored-by: Ɓukasz Langa Co-authored-by: Alexander Belopolsky --- diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index d46eaade142e..df02b68db253 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1043,7 +1043,7 @@ Other constructors, all class methods: Return a :class:`.datetime` corresponding to *date_string*, parsed according to *format*. - This is equivalent to:: + If *format* does not contain microseconds or timezone information, this is equivalent to:: datetime(*(time.strptime(date_string, format)[0:6]))