[Python-checkins] python/dist/src/Doc/lib emailutil.tex,1.9,1.10

anthonybaxter at users.sourceforge.net anthonybaxter at users.sourceforge.net
Mon Oct 11 15:53:09 CEST 2004

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

Modified Files:
Log Message:
Added a usegmt flag to email.Utils.formatdate - this allows it to be 
used to replace rfc822.formatdate for protocols like HTTP (where 'GMT' must
be the timezone string).

Index: emailutil.tex
RCS file: /cvsroot/python/python/dist/src/Doc/lib/emailutil.tex,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- emailutil.tex	3 Oct 2004 03:16:17 -0000	1.9
+++ emailutil.tex	11 Oct 2004 13:53:07 -0000	1.10
@@ -84,7 +84,7 @@
 common use.
-\begin{funcdesc}{formatdate}{\optional{timeval\optional{, localtime}}}
+\begin{funcdesc}{formatdate}{\optional{timeval\optional{, localtime}\optional{, usegmt}}}
 Returns a date string as per \rfc{2822}, e.g.:
@@ -99,6 +99,11 @@
 \var{timeval}, and returns a date relative to the local timezone
 instead of UTC, properly taking daylight savings time into account.
 The default is \code{False} meaning UTC is used.
+Optional \var{usegmt} is a flag that when \code{True}, outputs a 
+date string with the timezone as an ascii string \code{GMT}, rather
+than a numeric \code{-0000}. This is needed for some protocols (such
+as HTTP). This only applies when \var{localtime} is \code{False}

More information about the Python-checkins mailing list