Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update docs to reflect the addition of parsing Z
  • Loading branch information
mariocj89 committed Oct 23, 2017
commit 7c533072cfbaea789cc8e6bda29287c8c9bae99e
7 changes: 4 additions & 3 deletions Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2175,9 +2175,10 @@ Notes:
The UTC offset is not restricted to a whole number of minutes.

.. versionchanged:: 3.7
When ``%z`` directive is provided to the :meth:`strptime` method, offsets
with colons will be parsed as well. For example, offsets like ``'+01:00'``
will be parsed as an offset of one hour.
When ``%z`` directive is provided to the :meth:`strptime` method, any valid
RFC-822/ISO 8601 standard utftime-offset can be parsed. For example, strings

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utftime-offset? This should be UTC offset, right?

like ``'+01:00'`` will be parsed as an offset of one hour and or ``'Z'`` will
be transofmred to a 0 utc offset.

``%Z``
If :meth:`tzname` returns ``None``, ``%Z`` is replaced by an empty
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Add support for parsing utc offsets with colon when using %z in strptime
Add support for parsing RFC-822/ISO 8601 utf offsets