[Python-checkins] CVS: python/dist/src/Doc/lib libtime.tex,1.35,1.36
Eric S. Raymond
esr@users.sourceforge.net
Sat, 27 Jan 2001 16:56:56 -0800
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv26399
Modified Files:
libtime.tex
Log Message:
Instructive example for strftime(); how to generate RFC822 dates.
Index: libtime.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtime.tex,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** libtime.tex 2001/01/19 23:16:56 1.35
--- libtime.tex 2001/01/28 00:56:54 1.36
***************
*** 225,228 ****
--- 225,244 ----
\end{description}
+ Here is an example, a format for dates compatible with that specified
+ in the \rfc{822} Internet email standard.
+ \footnote{The use of \%Z is now
+ deprecated, but the \%z escape that expands to the preferred
+ hour/minute offset is not supported by all ANSI C libraries. Also,
+ a strict reading of the original 1982 \rfc{822} standard calls for
+ a two-digit year (\%y rather than \%Y), but practice moved to
+ 4-digit years long before the year 2000.}
+
+ \begin{verbatim}
+ >>> from time import *
+ >>> strftime("\%a, \%d \%b \%Y \%H:\%M:\%S \%Z", localtime())
+ 'Sat, 27 Jan 2001 05:15:05 EST'
+ >>>
+ \end{verbatim}
+
Additional directives may be supported on certain platforms, but
only the ones listed here have a meaning standardized by ANSI C.