diff options
author | Fred Drake <fdrake@acm.org> | 2001-06-29 15:39:53 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-06-29 15:39:53 (GMT) |
commit | f29ca18df3d4408d54989a34b91db426509ffda5 (patch) | |
tree | ea85b0fd310a5299451f951c30b2d5f2a1266f0d | |
parent | 9f9bd6af7805d1df5152318663a55f0087b51eac (diff) | |
download | cpython-f29ca18df3d4408d54989a34b91db426509ffda5.zip cpython-f29ca18df3d4408d54989a34b91db426509ffda5.tar.gz cpython-f29ca18df3d4408d54989a34b91db426509ffda5.tar.bz2 |
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.
-rw-r--r-- | Doc/lib/libtime.tex | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/lib/libtime.tex b/Doc/lib/libtime.tex index d5e170b..30cae45 100644 --- a/Doc/lib/libtime.tex +++ b/Doc/lib/libtime.tex @@ -230,19 +230,19 @@ Notes: \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 +in the \rfc{2822} Internet email standard. + \footnote{The use of \code{\%Z} is now + deprecated, but the \code{\%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.} + 4-digit years long before the year 2000. The 4-digit year has + been mandated by \rfc{2822}, which obsoletes \rfc{822}.} \begin{verbatim} ->>> from time import * ->>> strftime("%a, %d %b %Y %H:%M:%S %Z", localtime()) -'Sat, 27 Jan 2001 05:15:05 EST' ->>> +>>> from time import gmtime, strftime +>>> strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime()) +'Thu, 28 Jun 2001 14:17:15 +0000' \end{verbatim} Additional directives may be supported on certain platforms, but |