Skip to content

Commit 7c53307

Browse files
committed
Update docs to reflect the addition of parsing Z
1 parent e0e3873 commit 7c53307

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Doc/library/datetime.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,9 +2175,10 @@ Notes:
21752175
The UTC offset is not restricted to a whole number of minutes.
21762176

21772177
.. 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.
2178+
When ``%z`` directive is provided to the :meth:`strptime` method, any valid
2179+
RFC-822/ISO 8601 standard utftime-offset can be parsed. For example, strings
2180+
like ``'+01:00'`` will be parsed as an offset of one hour and or ``'Z'`` will
2181+
be transofmred to a 0 utc offset.
21812182

21822183
``%Z``
21832184
If :meth:`tzname` returns ``None``, ``%Z`` is replaced by an empty
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Add support for parsing utc offsets with colon when using %z in strptime
1+
Add support for parsing RFC-822/ISO 8601 utf offsets

0 commit comments

Comments
 (0)