diff options
| author | Brett Cannon <bcannon@gmail.com> | 2004-03-02 04:38:10 +0000 |
|---|---|---|
| committer | Brett Cannon <bcannon@gmail.com> | 2004-03-02 04:38:10 +0000 |
| commit | d1080a3418b2a162b44d0d5738a6da2276133eb7 (patch) | |
| tree | 73902ccab6d9c184e726722e1e999fc460b5a90b /Doc/lib/libtime.tex | |
| parent | 0a4977c2f3b8b3cd80f326f44e87076b2578b1b6 (diff) | |
| download | cpython-git-d1080a3418b2a162b44d0d5738a6da2276133eb7.tar.gz | |
Have strftime() check its time tuple argument to make sure the tuple's values
are within proper boundaries as specified in the docs.
This can break possible code (datetime module needed changing, for instance)
that uses 0 for values that need to be greater 1 or greater (month, day, and
day of year).
Fixes bug #897625.
Diffstat (limited to 'Doc/lib/libtime.tex')
| -rw-r--r-- | Doc/lib/libtime.tex | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/lib/libtime.tex b/Doc/lib/libtime.tex index 2769452947..87dd271333 100644 --- a/Doc/lib/libtime.tex +++ b/Doc/lib/libtime.tex @@ -211,8 +211,11 @@ Convert a tuple or \class{struct_time} representing a time as returned by \function{gmtime()} or \function{localtime()} to a string as specified by the \var{format} argument. If \var{t} is not provided, the current time as returned by \function{localtime()} is -used. \var{format} must be a string. +used. \var{format} must be a string. \exception{ValueError} is raised +if any field in \var{t} is outside of the allowed range. \versionchanged[Allowed \var{t} to be omitted]{2.1} +\versionchanged[\exception{ValueError} raised if a field in \var{t} is +out of range.]{2.4} The following directives can be embedded in the \var{format} string. They are shown without the optional field width and precision |
