bpo-33400: Clarified documentation to indicate no strict adherence to… · python/cpython@eb8516b (original) (raw)
`@@ -466,7 +466,8 @@ def init(self, fmt=None, datefmt=None, style='%'):
`
466
466
``
467
467
` Initialize the formatter either with the specified format string, or a
`
468
468
` default as described above. Allow for specialized date formatting with
`
469
``
`-
the optional datefmt argument (if omitted, you get the ISO8601 format).
`
``
469
`+
the optional datefmt argument. If datefmt is omitted, you get an
`
``
470
`+
ISO8601-like (or RFC 3339-like) format.
`
470
471
``
471
472
` Use a style parameter of '%', '{' or '$' to specify that you want to
`
472
473
``` use one of %-formatting, :meth:str.format
({}
) formatting or
```
`@@ -494,13 +495,13 @@ def formatTime(self, record, datefmt=None):
`
494
495
` in formatters to provide for any specific requirement, but the
`
495
496
` basic behaviour is as follows: if datefmt (a string) is specified,
`
496
497
` it is used with time.strftime() to format the creation time of the
`
497
``
`-
record. Otherwise, the ISO8601 format is used. The resulting
`
498
``
`-
string is returned. This function uses a user-configurable function
`
499
``
`-
to convert the creation time to a tuple. By default, time.localtime()
`
500
``
`-
is used; to change this for a particular formatter instance, set the
`
501
``
`-
'converter' attribute to a function with the same signature as
`
502
``
`-
time.localtime() or time.gmtime(). To change it for all formatters,
`
503
``
`-
for example if you want all logging times to be shown in GMT,
`
``
498
`+
record. Otherwise, an ISO8601-like (or RFC 3339-like) format is used.
`
``
499
`+
The resulting string is returned. This function uses a user-configurable
`
``
500
`+
function to convert the creation time to a tuple. By default,
`
``
501
`+
time.localtime() is used; to change this for a particular formatter
`
``
502
`+
instance, set the 'converter' attribute to a function with the same
`
``
503
`+
signature as time.localtime() or time.gmtime(). To change it for all
`
``
504
`+
formatters, for example if you want all logging times to be shown in GMT,
`
504
505
` set the 'converter' attribute in the Formatter class.
`
505
506
` """
`
506
507
`ct = self.converter(record.created)
`