summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2004-03-02 04:38:10 (GMT)
committerBrett Cannon <bcannon@gmail.com>2004-03-02 04:38:10 (GMT)
commitd1080a3418b2a162b44d0d5738a6da2276133eb7 (patch)
tree73902ccab6d9c184e726722e1e999fc460b5a90b /Doc/lib
parent0a4977c2f3b8b3cd80f326f44e87076b2578b1b6 (diff)
downloadcpython-d1080a3418b2a162b44d0d5738a6da2276133eb7.zip
cpython-d1080a3418b2a162b44d0d5738a6da2276133eb7.tar.gz
cpython-d1080a3418b2a162b44d0d5738a6da2276133eb7.tar.bz2
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')
-rw-r--r--Doc/lib/libtime.tex5
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/lib/libtime.tex b/Doc/lib/libtime.tex
index 2769452..87dd271 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