diff options
-rw-r--r-- | Doc/library/datetime.rst | 8 | ||||
-rw-r--r-- | Doc/library/time.rst | 17 |
2 files changed, 19 insertions, 6 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index b9adbcc..cad0eb4 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1661,8 +1661,12 @@ version) requires, and these work on all platforms with a standard C implementation. Note that the 1999 version of the C standard added additional format codes. -The exact range of years for which :meth:`strftime` works also varies across -platforms. Regardless of platform, years before 1900 cannot be used. +The exact range of years for which :meth:`strftime` works also varies +across platforms. Regardless of platform, years before 1000 cannot be +used with ``datetime`` module ``strftime()`` methods. The ``time`` +module ``strftime()`` function exibit different behavior depending on +the value of ``time.accept2dyear`` variable. See :ref:`Year 2000 +(Y2K) issues <time-y2kissues>` for details. +-----------+--------------------------------+-------+ | Directive | Meaning | Notes | diff --git a/Doc/library/time.rst b/Doc/library/time.rst index dc102d6..b8745a6 100644 --- a/Doc/library/time.rst +++ b/Doc/library/time.rst @@ -120,10 +120,19 @@ The module defines the following functions and data items: .. data:: accept2dyear - Boolean value indicating whether two-digit year values will be accepted. This - is true by default, but will be set to false if the environment variable - :envvar:`PYTHONY2K` has been set to a non-empty string. It may also be modified - at run time. + Boolean value indicating whether two-digit year values will be + mapped to 1969--2068 range by :func:`asctime`, :func:`mktime`, and + :func:`strftime` functions. This is true by default, but will be + set to false if the environment variable :envvar:`PYTHONY2K` has + been set to a non-empty string. It may also be modified at run + time. + + .. deprecated:: 3.2 + Mapping of 2-digit year values by :func:`asctime`, + :func:`mktime`, and :func:`strftime` functions to 1969--2068 + range is deprecated. Programs that need to process 2-digit + years should use ``%y`` code available in :func:`strptime` + function or convert 2-digit year values to 4-digit themselves. .. data:: altzone |