summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-06-21 15:21:14 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-06-21 15:21:14 (GMT)
commit75f94c210a9c270dda64135030a29e7791827473 (patch)
treeb725fb91ca15f54e81b8907f69a399da63d7226a /Doc
parentc56b094bab0728e3a157e2b90047efdd2e817153 (diff)
downloadcpython-75f94c210a9c270dda64135030a29e7791827473.zip
cpython-75f94c210a9c270dda64135030a29e7791827473.tar.gz
cpython-75f94c210a9c270dda64135030a29e7791827473.tar.bz2
Issue #9005: Prevent utctimetuple() from producing year 0 or year 10,000.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/datetime.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index 90c14c1..f626e35 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -974,10 +974,10 @@ Instance methods:
``d.dst()`` returns. DST is never in effect for a UTC time.
If *d* is aware, *d* is normalized to UTC time, by subtracting
- ``d.utcoffset()``, and a :class:`time.struct_time` for the normalized time is
- returned. :attr:`tm_isdst` is forced to 0. Note that the result's
- :attr:`tm_year` member may be :const:`MINYEAR`\ -1 or :const:`MAXYEAR`\ +1, if
- *d*.year was ``MINYEAR`` or ``MAXYEAR`` and UTC adjustment spills over a year
+ ``d.utcoffset()``, and a :class:`time.struct_time` for the
+ normalized time is returned. :attr:`tm_isdst` is forced to 0. Note
+ that an :exc:`OverflowError` may be raised if *d*.year was
+ ``MINYEAR`` or ``MAXYEAR`` and UTC adjustment spills over a year
boundary.