[issue13927] Extra spaces in the output of time.ctime

STINNER Victor report at bugs.python.org
Tue Feb 14 01:23:27 CET 2012


STINNER Victor <victor.stinner at gmail.com> added the comment:

> asctime() docs say it's a 24 char string.

I'm not sure that all platform conform to this "specification"... which is not future proof!

$ ./python 
Python 3.3.0a0 (default:af1a9508f7fa, Feb 14 2012, 01:18:15) 
[GCC 4.6.2 20111027 (Red Hat 4.6.2-1)] on linux
>>> import time
>>> time.ctime(2**38)
'Wed Jul 14 08:09:04 10680'
>>> len(time.ctime(2**38))
25

I suppose that you can say that the month day is formatted as 2 characters (padded with a space if needed).

----------
nosy: +haypo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13927>
_______________________________________


More information about the Python-bugs-list mailing list