Skip to content

Commit af68297

Browse files
committed
Docs for parsing using %z and colons
1 parent 0facd08 commit af68297

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Doc/library/datetime.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,6 +2174,11 @@ Notes:
21742174
.. versionchanged:: 3.7
21752175
The UTC offset is not restricted to a whole number of minutes.
21762176

2177+
.. versionchanged:: 3.7
2178+
When ``%z`` directive is provided to the :meth:`strptime` method, offsets
2179+
with colons will be parsed as well. For example, offsets like ``'+01:00'``
2180+
will be parsed as an offset of one hour.
2181+
21772182
``%Z``
21782183
If :meth:`tzname` returns ``None``, ``%Z`` is replaced by an empty
21792184
string. Otherwise ``%Z`` is replaced by the returned value, which must

0 commit comments

Comments
 (0)