[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 
<https://bugs.python.org/issue34642>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
'Wed Sep  2 22:30:00 2018'

This seems like it might be intended behavior for some reason, but I don't see 
the reason.

--
components: Library (Lib)
messages: 325114
nosy: William Chaseling
priority: normal
severity: normal
status: open
title: time.ctime() uses %3d instead of %.2d to format.
type: behavior
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue34642>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com