[Python-checkins] python/dist/src/Doc/lib libtime.tex,1.62,1.63

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Mon Mar 1 23:38:12 EST 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29826/Doc/lib

Modified Files:
	libtime.tex 
Log Message:
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.


Index: libtime.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtime.tex,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** libtime.tex	31 Dec 2003 04:52:36 -0000	1.62
--- libtime.tex	2 Mar 2004 04:38:10 -0000	1.63
***************
*** 212,217 ****
  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.
  \versionchanged[Allowed \var{t} to be omitted]{2.1}
  
  The following directives can be embedded in the \var{format} string.
--- 212,220 ----
  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.  \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.




More information about the Python-checkins mailing list