Fix settings.md strftime URL and clarify the representation "a Python strftime format string" #9116
Unanswered
t-ubukata
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The [strftime] link reference definition defines
https://docs.python.org/3/library/time.html#time.strftime
It's the URL of time.strftime(format[, t]), but this documentation is different from strftime() and strptime() Behavior,
https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior
Former doen't take %f, latter takes, and actually datetime.now().strftime() takes %f and time.strftime() doesn't take %f in CPython 3.10.12.
Latter says "date, datetime, and time objects all support a strftime(format) method, to create a string representing the time under the control of an explicit format string.".
It looks like a Python issue, but it's better to clarify the representation "a Python strftime format string" means what.
For example, it means time.strftime() in TIME_FORMAT block, and means datetime.datetime.strftime() in DATETIME_FORMAT block.
One option is to divide this definition into two URLs and clarify the representation "a Python strftime format string" means what.
Beta Was this translation helpful? Give feedback.
All reactions