diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2010-06-17 18:30:34 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2010-06-17 18:30:34 (GMT) |
commit | ca94f5575825aad204a86391e7d4c5d047c9fed8 (patch) | |
tree | 288921ee7da71206ee6048624535550c07acfbf1 /Doc | |
parent | f4112e2653f310b6e6a210c659648dbe45d3a042 (diff) | |
download | cpython-ca94f5575825aad204a86391e7d4c5d047c9fed8.zip cpython-ca94f5575825aad204a86391e7d4c5d047c9fed8.tar.gz cpython-ca94f5575825aad204a86391e7d4c5d047c9fed8.tar.bz2 |
Issue #6641: The datetime.strptime method now supports the %z directive.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/datetime.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index cb55afb..ae73e16 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1760,3 +1760,10 @@ Notes: (5) For example, if :meth:`utcoffset` returns ``timedelta(hours=-3, minutes=-30)``, ``%z`` is replaced with the string ``'-0330'``. + +.. versionadded:: 3.2 + + When the ``%z`` directive is provided to the :meth:`strptime` + method, an aware :class:`datetime` object will be produced. The + ``tzinfo`` of the result will be set to a :class:`timezone` + instance.
\ No newline at end of file |