File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -224,6 +224,22 @@ \section{\module{time} ---
224224 seconds and the (very rare) double leap seconds.
225225\end {description }
226226
227+ Here is an example, a format for dates compatible with that specified
228+ in the \rfc {822} Internet email standard.
229+ \footnote {The use of \% Z is now
230+ deprecated, but the \% z escape that expands to the preferred
231+ hour/minute offset is not supported by all ANSI C libraries. Also,
232+ a strict reading of the original 1982 \rfc {822} standard calls for
233+ a two-digit year (\% y rather than \% Y), but practice moved to
234+ 4-digit years long before the year 2000.}
235+
236+ \begin {verbatim }
237+ >>> from time import *
238+ >>> strftime("\%a, \%d \%b \%Y \%H:\%M:\%S \%Z", localtime())
239+ 'Sat, 27 Jan 2001 05:15:05 EST'
240+ >>>
241+ \end {verbatim }
242+
227243Additional directives may be supported on certain platforms, but
228244only the ones listed here have a meaning standardized by ANSI C.
229245
You can’t perform that action at this time.
0 commit comments