diff options
author | R. David Murray <rdmurray@bitdance.com> | 2009-04-02 04:50:03 +0000 |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2009-04-02 04:50:03 +0000 |
commit | bd25d337bab79219bf52d17b2832c04c5c6c60da (patch) | |
tree | fa42a26a836749e61c8ffc68b6e0d23e10aa39e1 | |
parent | a826f32054710f7dc602573f99c6c87a725adbba (diff) | |
download | cpython-bd25d337bab79219bf52d17b2832c04c5c6c60da.tar.gz cpython-bd25d337bab79219bf52d17b2832c04c5c6c60da.zip |
Clarify that datetime strftime does not produce leap seconds and datetime
strptime does not accept it in the strftime behavior section of the
datetime docs.
Closes issue 2568.
Porting by hand since svnmerge disclaims all knowledge of the trunk commit.
-rw-r--r-- | Doc/library/datetime.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index f0827265899..0bf3eb7f0e3 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1621,8 +1621,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 |