diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-03-13 23:15:40 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-03-13 23:15:40 (GMT) |
commit | 21f5893571e953aa6042ef686bc2ea539acf39d1 (patch) | |
tree | 5fd9b7b5e3e4b696156ecd9213501021fe25be94 /Doc | |
parent | 910df329fd4f4206966e98ddf81ae169e0ca4d1d (diff) | |
download | cpython-21f5893571e953aa6042ef686bc2ea539acf39d1.zip cpython-21f5893571e953aa6042ef686bc2ea539acf39d1.tar.gz cpython-21f5893571e953aa6042ef686bc2ea539acf39d1.tar.bz2 |
Issue #14180: datetime.date.fromtimestamp(), datetime.datetime.fromtimestamp()
and datetime.datetime.utcfromtimestamp() now raise an OSError instead of
ValueError if localtime() or gmtime() failed.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/datetime.rst | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index d16551e..c8dcbc1 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -404,7 +404,8 @@ Other constructors, all class methods: .. versionchanged:: 3.3 Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is out of the range of values supported by the platform C - :c:func:`localtime` function. + :c:func:`localtime` function. Raise :exc:`OSError` instead of + :exc:`ValueError` on :c:func:`localtime` failure. .. classmethod:: date.fromordinal(ordinal) @@ -720,7 +721,9 @@ Other constructors, all class methods: .. versionchanged:: 3.3 Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is out of the range of values supported by the platform C - :c:func:`localtime` or :c:func:`gmtime` functions + :c:func:`localtime` or :c:func:`gmtime` functions. Raise :exc:`OSError` + instead of :exc:`ValueError` on :c:func:`localtime` or :c:func:`gmtime` + failure. .. classmethod:: datetime.utcfromtimestamp(timestamp) @@ -750,7 +753,8 @@ Other constructors, all class methods: .. versionchanged:: 3.3 Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is out of the range of values supported by the platform C - :c:func:`gmtime` function. + :c:func:`gmtime` function. Raise :exc:`OSError` instead of + :exc:`ValueError` on :c:func:`gmtime` failure. .. classmethod:: datetime.fromordinal(ordinal) |