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 /Misc | |
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 'Misc')
-rw-r--r-- | Misc/NEWS | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1322,6 +1322,14 @@ Library Extension Modules ----------------- +- Issue #6641: The ``datetime.strptime`` method now supports the + ``%z`` directive. When the ``%z`` directive is present in the + format string, an aware ``datetime`` object is returned with + ``tzinfo`` bound to a ``datetime.timezone`` instance constructed + from the parsed offset. If both ``%z`` and ``%Z`` are present, the + data in ``%Z`` field is used for timezone name, but ``%Z`` data + without ``%z`` is discarded. + - Issue #5094: The ``datetime`` module now has a simple concrete class implementing ``datetime.tzinfo`` interface. Instances of the new class, ``datetime.timezone``, return fixed name and UTC offset from |