]> granicus.if.org Git - python/commitdiff
Issue #2568: Removed bogus rationale for supporting tm_sec=61.
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>
Mon, 10 Jan 2011 22:56:14 +0000 (22:56 +0000)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>
Mon, 10 Jan 2011 22:56:14 +0000 (22:56 +0000)
Doc/library/datetime.rst
Doc/library/time.rst

index cad0eb43bc9de14c04884392b1eed7061aa12468..2ace965b17823a19dc0f8b5f069fe1a668fecca9 100644 (file)
@@ -1663,10 +1663,7 @@ format codes.
 
 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.
+used with ``datetime`` module ``strftime()`` methods.
 
 +-----------+--------------------------------+-------+
 | Directive | Meaning                        | Notes |
@@ -1710,7 +1707,7 @@ the value of ``time.accept2dyear`` variable.  See :ref:`Year 2000
 |           | AM or PM.                      |       |
 +-----------+--------------------------------+-------+
 | ``%S``    | Second as a decimal number     | \(3)  |
-|           | [00,61].                       |       |
+|           | [00,59].                       |       |
 +-----------+--------------------------------+-------+
 | ``%U``    | Week number of the year        | \(4)  |
 |           | (Sunday as the first day of    |       |
@@ -1767,12 +1764,8 @@ Notes:
    the output hour field if the ``%I`` directive is used to parse the hour.
 
 (3)
-   The range really is ``0`` to ``61``; according to the Posix standard this
-   accounts for leap seconds and the (very rare) double leap seconds.
-   The :mod:`time` module may produce and does accept leap seconds since
-   it is based on the Posix standard, but the :mod:`datetime` module
-   does not accept leap seconds in :meth:`strptime` input nor will it
-   produce them in :func:`strftime` output.
+   Unlike :mod:`time` module, :mod:`datetime` module does not support
+   leap seconds.
 
 (4)
    When used with the :meth:`strptime` method, ``%U`` and ``%W`` are only used in
index dc6402c40002238dd42ca7bd5e2fb6d0f047169d..28e994c61c1c7330b75a52771318c118185836ae 100644 (file)
@@ -308,7 +308,7 @@ The module defines the following functions and data items:
    | ``%y``    | Year without century as a decimal number       |       |
    |           | [00,99].                                       |       |
    +-----------+------------------------------------------------+-------+
-   | ``%Y``    | Year with century as a decimal number.         |       |
+   | ``%Y``    | Year with century as a decimal number.         | \(4)  |
    |           |                                                |       |
    +-----------+------------------------------------------------+-------+
    | ``%Z``    | Time zone name (no characters if no time zone  |       |
@@ -324,13 +324,20 @@ The module defines the following functions and data items:
       the output hour field if the ``%I`` directive is used to parse the hour.
 
    (2)
-      The range really is ``0`` to ``61``; this accounts for leap seconds and the
-      (very rare) double leap seconds.
+      The range really is ``0`` to ``61``; value ``60`` is valid in
+      timestamps representing leap seconds and value ``61`` is supported
+      for historical reasons.
 
    (3)
       When used with the :func:`strptime` function, ``%U`` and ``%W`` are only used in
       calculations when the day of the week and the year are specified.
 
+   (4)
+      Produces different results depending on the value of
+      ``time.accept2dyear`` variable.  See :ref:`Year 2000 (Y2K)
+      issues <time-y2kissues>` for details.
+
+
    Here is an example, a format for dates compatible with that specified  in the
    :rfc:`2822` Internet email standard.  [#]_ ::