Skip to content

Commit f869b56

Browse files
bpo-20281, bpo-29964: update datetime docs to refer %z and %Z to a pre-existing footnote (GH-30354)
(cherry picked from commit 305588c) Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 4de57db commit f869b56

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Doc/library/time.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,10 @@ Functions
434434
| | negative time difference from UTC/GMT of the | |
435435
| | form +HHMM or -HHMM, where H represents decimal| |
436436
| | hour digits and M represents decimal minute | |
437-
| | digits [-23:59, +23:59]. | |
437+
| | digits [-23:59, +23:59]. [1]_ | |
438438
+-----------+------------------------------------------------+-------+
439439
| ``%Z`` | Time zone name (no characters if no time zone | |
440-
| | exists). | |
440+
| | exists). Deprecated. [1]_ | |
441441
+-----------+------------------------------------------------+-------+
442442
| ``%%`` | A literal ``'%'`` character. | |
443443
+-----------+------------------------------------------------+-------+
@@ -458,7 +458,7 @@ Functions
458458
calculations when the day of the week and the year are specified.
459459

460460
Here is an example, a format for dates compatible with that specified in the
461-
:rfc:`2822` Internet email standard. [#]_ ::
461+
:rfc:`2822` Internet email standard. [1]_ ::
462462

463463
>>> from time import gmtime, strftime
464464
>>> strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime())
@@ -879,10 +879,9 @@ Timezone Constants
879879

880880
.. rubric:: Footnotes
881881

882-
.. [#] The use of ``%Z`` is now deprecated, but the ``%z`` escape that expands to the
883-
preferred hour/minute offset is not supported by all ANSI C libraries. Also, a
882+
.. [1] The use of ``%Z`` is now deprecated, but the ``%z`` escape that expands to the
883+
preferred hour/minute offset is not supported by all ANSI C libraries. Also, a
884884
strict reading of the original 1982 :rfc:`822` standard calls for a two-digit
885-
year (%y rather than %Y), but practice moved to 4-digit years long before the
885+
year (``%y`` rather than ``%Y``), but practice moved to 4-digit years long before the
886886
year 2000. After that, :rfc:`822` became obsolete and the 4-digit year has
887887
been first recommended by :rfc:`1123` and then mandated by :rfc:`2822`.
888-

0 commit comments

Comments
 (0)