[Python-checkins] cpython (merge 3.2 -> default): Merged documentation update for Formatter.formatTime.

vinay.sajip python-checkins at python.org
Sun Jun 12 12:50:49 CEST 2011


http://hg.python.org/cpython/rev/67e9ab30f5d3
changeset: 70806:67e9ab30f5d3
parent: 70804:596adf14914c
parent: 70805:7b79bcb9bc89
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Sun Jun 12 11:50:40 2011 +0100
summary:
 Merged documentation update for Formatter.formatTime.
files:
 Doc/library/logging.rst | 8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -453,6 +453,14 @@
 record. Otherwise, the ISO8601 format is used. The resulting string is
 returned.
 
+ This function uses a user-configurable function to convert the creation
+ time to a tuple. By default, :func:`time.localtime` is used; to change
+ this for a particular formatter instance, set the ``converter`` attribute
+ to a function with the same signature as :func:`time.localtime` or
+ :func:`time.gmtime`. To change it for all formatters, for example if you
+ want all logging times to be shown in GMT, set the ``converter``
+ attribute in the ``Formatter`` class.
+
 .. versionchanged:: 3.3
 Previously, the default ISO 8601 format was hard-coded as in this
 example: ``2010年09月06日 22:38:15,292`` where the part before the comma is
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /