From: R David Murray Date: Fri, 13 Jun 2014 21:23:34 +0000 (-0400) Subject: #5904: Add sentence about the encoding of strftime's result. X-Git-Tag: v2.7.8~37^2~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec92b4a9fa54ec454c66b78c3abe81f7fef07b19;p=python #5904: Add sentence about the encoding of strftime's result. --- diff --git a/Doc/library/time.rst b/Doc/library/time.rst index 24b52c12f7..304bf0c99f 100644 --- a/Doc/library/time.rst +++ b/Doc/library/time.rst @@ -236,7 +236,9 @@ The module defines the following functions and data items: :func:`gmtime` or :func:`localtime` to a string as specified by the *format* argument. If *t* is not provided, the current time as returned by :func:`localtime` is used. *format* must be a string. :exc:`ValueError` is - raised if any field in *t* is outside of the allowed range. + raised if any field in *t* is outside of the allowed range. :func:`strftime` + returns a locale depedent byte string; the result may be converted to unicode + by doing ``strftime().decode(locale.getlocale()[1])``. .. versionchanged:: 2.1 Allowed *t* to be omitted.