[issue29690] no %z directive for strptime in python2, doc says nothing about it

2017-03-05 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: Neither documentation is clear on whether each of those flags are available for strptime too. A precision should be added on a flag if it's not available for strptime. What do you think ? -- ___ Python tracker

[issue29690] no %z directive for strptime in python2, doc says nothing about it

2017-03-02 Thread R. David Murray
R. David Murray added the comment: This almost qualifies as a FAQ :) In 2.7 (and in 3.x, though we've added some additional platform independent stuff there), strptime supports what the platform supports, and this is documented: "The following is a list of all the format codes that the C

[issue29690] no %z directive for strptime in python2, doc says nothing about it

2017-03-01 Thread Mathieu Dupuy
New submission from Mathieu Dupuy: ➜ ~ cat dt.py from datetime import * dt = datetime.strptime('+1720', '%z') print(dt) ➜ ~ python2 dt.py Traceback (most recent call last): File "dt.py", line 2, in dt = datetime.strptime('+1720', '%z') File "/usr/lib/python2.7/_strptime.py", line