File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1661,8 +1661,12 @@ version) requires, and these work on all platforms with a standard C
16611661implementation. Note that the 1999 version of the C standard added additional
16621662format codes.
16631663
1664- The exact range of years for which :meth: `strftime ` works also varies across
1665- platforms. Regardless of platform, years before 1900 cannot be used.
1664+ The exact range of years for which :meth: `strftime ` works also varies
1665+ across platforms. Regardless of platform, years before 1000 cannot be
1666+ used with ``datetime `` module ``strftime() `` methods. The ``time ``
1667+ module ``strftime() `` function exibit different behavior depending on
1668+ the value of ``time.accept2dyear `` variable. See :ref: `Year 2000
1669+ (Y2K) issues <time-y2kissues>` for details.
16661670
16671671+-----------+--------------------------------+-------+
16681672| Directive | Meaning | Notes |
Original file line number Diff line number Diff line change @@ -120,10 +120,19 @@ The module defines the following functions and data items:
120120
121121.. data :: accept2dyear
122122
123- Boolean value indicating whether two-digit year values will be accepted. This
124- is true by default, but will be set to false if the environment variable
125- :envvar: `PYTHONY2K ` has been set to a non-empty string. It may also be modified
126- at run time.
123+ Boolean value indicating whether two-digit year values will be
124+ mapped to 1969--2068 range by :func: `asctime `, :func: `mktime `, and
125+ :func: `strftime ` functions. This is true by default, but will be
126+ set to false if the environment variable :envvar: `PYTHONY2K ` has
127+ been set to a non-empty string. It may also be modified at run
128+ time.
129+
130+ .. deprecated :: 3.2
131+ Mapping of 2-digit year values by :func: `asctime `,
132+ :func: `mktime `, and :func: `strftime ` functions to 1969--2068
133+ range is deprecated. Programs that need to process 2-digit
134+ years should use ``%y `` code available in :func: `strptime `
135+ function or convert 2-digit year values to 4-digit themselves.
127136
128137
129138.. data :: altzone
You can’t perform that action at this time.
0 commit comments