Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f29ca18

Browse files
committed
SourceForge bug #437041:
Use a portable format in the example that creates a timestamp suitable for use in email, also updating it and the footnote from RFC 822 to RFC 2822.
1 parent 9f9bd6a commit f29ca18

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Doc/lib/libtime.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -230,19 +230,19 @@ \section{\module{time} ---
230230
\end{description}
231231

232232
Here is an example, a format for dates compatible with that specified
233-
in the \rfc{822} Internet email standard.
234-
\footnote{The use of \%Z is now
235-
deprecated, but the \%z escape that expands to the preferred
233+
in the \rfc{2822} Internet email standard.
234+
\footnote{The use of \code{\%Z} is now
235+
deprecated, but the \code{\%z} escape that expands to the preferred
236236
hour/minute offset is not supported by all ANSI C libraries. Also,
237237
a strict reading of the original 1982 \rfc{822} standard calls for
238238
a two-digit year (\%y rather than \%Y), but practice moved to
239-
4-digit years long before the year 2000.}
239+
4-digit years long before the year 2000. The 4-digit year has
240+
been mandated by \rfc{2822}, which obsoletes \rfc{822}.}
240241

241242
\begin{verbatim}
242-
>>> from time import *
243-
>>> strftime("%a, %d %b %Y %H:%M:%S %Z", localtime())
244-
'Sat, 27 Jan 2001 05:15:05 EST'
245-
>>>
243+
>>> from time import gmtime, strftime
244+
>>> strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime())
245+
'Thu, 28 Jun 2001 14:17:15 +0000'
246246
\end{verbatim}
247247

248248
Additional directives may be supported on certain platforms, but

0 commit comments

Comments
 (0)