[issue34642] time.ctime() uses %3d instead of %.2d to format.

2018-09-11 Thread Martin Panter
Martin Panter added the comment: I think "ctime" and "asctime" are supposed to wrap or imitate the standard C functions: , so I think this is intended behaviour. But see Issue 13927 about improving the documentation. For a single-digit day

[issue34642] time.ctime() uses %3d instead of %.2d to format.

2018-09-11 Thread William Chaseling
William Chaseling added the comment: It's easy to get around using .replace(' ', ' '), but it's still a bit annoying. -- ___ Python tracker ___

[issue34642] time.ctime() uses %3d instead of %.2d to format.

2018-09-11 Thread William Chaseling
New submission from William Chaseling : time.ctime() returns _asctime from a C module. _asctime returns a PyUnicode_FromFormat() result using "%s %s%3d %.2d:%.2d:%.2d %d" as the string formatter. This works: 'Wed Sep 12 22:30:00 2018' Except when day <10, because it uses %3d instead of %.2d