This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2010年01月14日 01:46 by mikejs, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| strptime.diff | mikejs, 2010年01月14日 01:45 | review | ||
| strptime.diff | mikejs, 2010年01月14日 05:38 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg97748 - (view) | Author: Michael Stephens (mikejs) | Date: 2010年01月14日 01:45 | |
The documentation for strftime and strptime behavior strikes me as a bit jumbled right now. The behavior of datetime.datetime.strptime is explained by a reference to time.strptime, which in turn references time.strftime to explain the format string.
The docs for the datetime.{datetime,date,time}.strftime methods, on the other hand, reference the 'strftime Behavior' section of the datetime module docs to explain the behavior of the format string. This section even notes the differences between strptime and strftime behavior.
I've tried to clear this up a little bit by renaming this section 'strftime and strptime Behavior' and referencing it from the datetime.datetime.strptime docs.
|
|||
| msg97751 - (view) | Author: Brian Curtin (brian.curtin) * (Python committer) | Date: 2010年01月14日 04:04 | |
Seems reasonable.
Additionally, the block about time.strftime not utilizing date related formats (line 1514 in the patched file) can be removed. It has worked for a long time (forever?).
>>> time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
'2010-01-13 21:32:52'
|
|||
| msg97753 - (view) | Author: Michael Stephens (mikejs) | Date: 2010年01月14日 05:38 | |
I think it's referring to:
>>> datetime.time(10, 34, 6).strftime("%Y-%m-%d %H:%M:%S")
'1900-01-01 10:34:06'
and thus still applies. It is wrong about month and day being replaced by '0', however, and I've updated the patch to change that to '1'.
|
|||
| msg162586 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年06月10日 14:05 | |
This was applied by Georg in SVN revision r77561 on 2010年01月17日. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:56 | admin | set | github: 51948 |
| 2012年06月10日 14:05:57 | r.david.murray | set | status: open -> closed nosy: + r.david.murray messages: + msg162586 resolution: fixed stage: patch review -> resolved |
| 2010年07月22日 15:37:56 | BreamoreBoy | set | assignee: georg.brandl -> docs@python nosy: + docs@python |
| 2010年01月14日 05:38:14 | mikejs | set | files:
+ strptime.diff messages: + msg97753 |
| 2010年01月14日 04:04:01 | brian.curtin | set | nosy:
+ brian.curtin messages: + msg97751 |
| 2010年01月14日 02:55:17 | ezio.melotti | set | priority: normal nosy: + ezio.melotti versions: + Python 2.6, Python 3.1, Python 3.2 stage: patch review |
| 2010年01月14日 01:46:00 | mikejs | create | |