]> granicus.if.org Git - python/commitdiff
Clarify that datetime strftime does not produce leap seconds and datetime
authorR. David Murray <rdmurray@bitdance.com>
Thu, 2 Apr 2009 04:34:04 +0000 (04:34 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Thu, 2 Apr 2009 04:34:04 +0000 (04:34 +0000)
strptime does not accept it in the strftime behavior section of the
datetime docs.

Closes issue 2568.

Doc/library/datetime.rst

index 099627647ddb963789abe6bb7969611807eca8bf..5539c5a940700bea17753439fb4239878eba1662 100644 (file)
@@ -1629,8 +1629,12 @@ Notes:
    the output hour field if the ``%I`` directive is used to parse the hour.
 
 (3)
-   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``; 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 :func:`strptime` input nor will it
+   produce them in :func:`strftime` output.
 
 (4)
    When used with the :func:`strptime` function, ``%U`` and ``%W`` are only used in