summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMario Corchero <mariocj89@gmail.com>2017-10-26 00:35:41 (GMT)
committerAlexander Belopolsky <abalkin@users.noreply.github.com>2017-10-26 00:35:41 (GMT)
commit32318930da70ff03320ec50813b843e7db6fbc2e (patch)
tree7284607df837403a99207f4f807f222c518fea9f /Doc
parent0f261583bae7e60e410709ed96398dd1b14c5454 (diff)
downloadcpython-32318930da70ff03320ec50813b843e7db6fbc2e.zip
cpython-32318930da70ff03320ec50813b843e7db6fbc2e.tar.gz
cpython-32318930da70ff03320ec50813b843e7db6fbc2e.tar.bz2
Closes bpo-31800: Support for colon when parsing time offsets (#4015)
Add support to strptime to parse time offsets with a colon between the hour and the minutes.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/datetime.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index 55be869..d032d28 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -2174,6 +2174,13 @@ Notes:
.. versionchanged:: 3.7
The UTC offset is not restricted to a whole number of minutes.
+ .. versionchanged:: 3.7
+ When the ``%z`` directive is provided to the :meth:`strptime` method,
+ the UTC offsets can have a colon as a separator between hours, minutes
+ and seconds.
+ For example, ``'+01:00:00'`` will be parsed as an offset of one hour.
+ In addition, providing ``'Z'`` is identical to ``'+00:00'``.
+
``%Z``
If :meth:`tzname` returns ``None``, ``%Z`` is replaced by an empty
string. Otherwise ``%Z`` is replaced by the returned value, which must