diff options
author | TW <tw@waldmann-edv.de> | 2022-08-28 21:27:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-28 21:27:42 (GMT) |
commit | 023c51d9d8e2fd91069eea2bf12e373f1c71e9d2 (patch) | |
tree | cdd0d6e04e5788ee2fd54faa2dbb4fc6586d8337 /Misc/NEWS.d | |
parent | e860e521ec0d84e175269aeb15cf24bd6053ad17 (diff) | |
download | cpython-023c51d9d8e2fd91069eea2bf12e373f1c71e9d2.zip cpython-023c51d9d8e2fd91069eea2bf12e373f1c71e9d2.tar.gz cpython-023c51d9d8e2fd91069eea2bf12e373f1c71e9d2.tar.bz2 |
gh-69142: add %:z strftime format code (gh-95983)
datetime.isoformat generates the tzoffset with colons, but there
was no format code to make strftime output the same format.
for simplicity and consistency the %:z formatting behaves mostly
as %z, with the exception of adding colons. this includes the
dynamic behaviour of adding seconds and microseconds only when
needed (when not 0).
this fixes the still open "generate" part of this issue:
https://github.com/python/cpython/issues/69142
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Library/2022-08-14-18-59-54.gh-issue-69142.6is5Pq.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2022-08-14-18-59-54.gh-issue-69142.6is5Pq.rst b/Misc/NEWS.d/next/Library/2022-08-14-18-59-54.gh-issue-69142.6is5Pq.rst new file mode 100644 index 0000000..0db8b37 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-08-14-18-59-54.gh-issue-69142.6is5Pq.rst @@ -0,0 +1 @@ +Add ``%:z`` strftime format code (generates tzoffset with colons as separator), see :ref:`strftime-strptime-behavior`. |