Issue 34158: Documentation of datetime '%z' format code is odd (original) (raw)

Created on 2018-07-19 21:34 by Christophe Nanteuil, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
datetime.rst.patch Christophe Nanteuil,2018-07-19 21:34 Patch
Pull Requests
URL Status Linked Edit
PR 8377 merged python-dev,2018-07-21 14:36
PR 9732 merged miss-islington,2018-10-05 22:57
Messages (7)
msg321968 - (view) Author: Christophe Nanteuil (Christophe Nanteuil) * Date: 2018-07-19 21:34
In § 8.1.8. "strftime() and strptime() Behavior", the documentation states that "%z" format code is a string of the form '±HHMM[SS[.uuuuuu]]' where uuuuuu is a 2-digit string giving the number of UTC offset microseconds. I think it's a 6-digit string.
msg322085 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-07-21 08:21
Added as part of 018d353c1c8c87767d2335cd884017c2ce12e045 and a fix regarding duplicate words for that part was added at bac2d5ba30339298db7d4caa9c8cd31d807cf081. Relevant format string at https://github.com/python/cpython/pull/2896/files#diff-25e2d173c84057d069b7890450714eddR214. Relevant test case with 6-digit string for microsecond : https://github.com/python/cpython/pull/2896/files#diff-acc40bec51c7de832de3361db3edae52R309. Table at https://docs.python.org/3.7/library/datetime.html#strftime-and-strptime-behavior could also be updated with microseconds being optional in the second column %z | UTC offset in the form ±HHMM[SS] (empty string if the object is naive). (empty), +0000, -0400, +1030 You can raise a GitHub PR for the same. Thanks
msg322140 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2018-07-22 09:14
FWIW more oddities with this paragraph could be fixed by: * removing the first “and” from “HH is . . ., [and] MM is . . ., SS is . . . and uuuuuu is”, * changing the condition for omitting “uuuuuu” from “a whole number of [minutes]” to “seconds”, and * changing “the [SS parts are] omitted” to singular “SS part is”.
msg322324 - (view) Author: Christophe Nanteuil (Christophe Nanteuil) * Date: 2018-07-24 19:08
PR updated according to Martin Panter comments.
msg327196 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2018-10-05 22:57
New changeset 92878829c31ab2fc71c60555ce87a5f6cbc876f0 by Alexander Belopolsky (Christophe Nanteuil) in branch 'master': bpo-34158: Documentation UTC offset update (GH-8377) https://github.com/python/cpython/commit/92878829c31ab2fc71c60555ce87a5f6cbc876f0
msg327211 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-10-06 02:44
New changeset 0991b9bb94036e0f271d223c8db7d81980c76736 by Ned Deily (Miss Islington (bot)) in branch '3.7': [3.7] bpo-34158: Documentation UTC offset update (GH-8377) (GH-9732) https://github.com/python/cpython/commit/0991b9bb94036e0f271d223c8db7d81980c76736
msg327803 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-10-15 23:14
I assume this can now be closed. Thanks, everyone!
History
Date User Action Args
2022-04-11 14:59:03 admin set github: 78339
2018-10-15 23:14:06 ned.deily set status: open -> closedversions: + Python 3.8messages: + resolution: fixedstage: patch review -> resolved
2018-10-06 02:44:29 ned.deily set nosy: + ned.deilymessages: +
2018-10-05 22:57:13 miss-islington set pull_requests: + <pull%5Frequest9118>
2018-10-05 22:57:06 belopolsky set nosy: + belopolskymessages: +
2018-07-24 19:08:16 Christophe Nanteuil set messages: +
2018-07-23 14:09:10 p-ganssle set nosy: + p-ganssle
2018-07-22 09:14:59 martin.panter set nosy: + martin.pantermessages: +
2018-07-21 14:36:01 python-dev set stage: patch reviewpull_requests: + <pull%5Frequest7908>
2018-07-21 08:21:32 xtreak set nosy: + xtreakmessages: +
2018-07-19 21:34:47 Christophe Nanteuil create