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

2018-12-27 Thread Harmandeep Singh


Harmandeep Singh  added the comment:

I have created a PR for the patch that I submitted, as this is my first 
contribution to the docs, I need to know that how do we decide if a change has 
to make an entry to `Misc/NEWS.d/next/` or needs `skip news` tag?

--
nosy:  -docs@python

___
Python tracker 

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



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

2018-12-24 Thread Harmandeep Singh


Harmandeep Singh  added the comment:

I have created the PR as mentioned, I have added the example for time.ctime() 
and also added the note to time.asctime.

--
pull_requests: +10527
stage:  -> patch review
versions: +Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



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

2018-12-22 Thread Antti Haapala


Antti Haapala  added the comment:

This should be added to `asctime` too.

The space-padded behaviour complies with the C standard which was the intent - 
after all, before it was using C `asctime` directly, and says that unlike C 
asctime, it doesn't have the newline character, meaning that as a rule, it 
should then behave similar to it, and only exception is marked.

Unfortunately MSVC asctime has been incorrectly using leading zeros 
(https://stackoverflow.com/q/53894148/918959).

--
nosy: +ztane

___
Python tracker 

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



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

2016-10-13 Thread Harmandeep Singh

Changes by Harmandeep Singh :


--
hgrepos:  -360

___
Python tracker 

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



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

2016-10-13 Thread Harmandeep Singh

Harmandeep Singh added the comment:

I was bored, I generated a patch for this.

Hope this helps :)

--
hgrepos: +360
keywords: +patch
nosy: +harman786
Added file: http://bugs.python.org/file45073/ctime-doc.patch

___
Python tracker 

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



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

2012-02-13 Thread STINNER Victor

STINNER Victor victor.stin...@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 rep...@bugs.python.org
http://bugs.python.org/issue13927
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2012-02-13 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Or you could give the strftime specification string that produces the 
equivalent output.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13927
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2012-02-02 Thread Roger Caldwell

New submission from Roger Caldwell ro...@monkey.net:

Hi.  I found this today and thought I would report.  I could not find anywhere 
that it was expected behavior.  When using time.ctime() to convert a date which 
only has 1 digit in the day position it returs a string with 2 spaces after the 
month vs one.

example
In [2]: import os,time

In [3]: time.ctime(os.path.getmtime('file.cfg'))
Out[3]: 'Tue Dec 13 18:52:58 2011'

In [4]: time.ctime(os.path.getmtime('14d-1.log'))
Out[4]: 'Tue Feb  1 19:53:11 2011'

Is this expected behavior?

--
components: None
messages: 152475
nosy: Roger.Caldwell
priority: normal
severity: normal
status: open
title: Extra spaces in the output of time.ctime
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13927
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2012-02-02 Thread Eric V. Smith

Eric V. Smith e...@trueblade.com added the comment:

That's definitely the expected behavior. It's the same as the C library version 
of ctime().

But I couldn't find it documented in the Python docs, so I'm changing this to a 
documentation issue.

Thanks for the report.

--
assignee:  - docs@python
components: +Documentation -None
nosy: +docs@python, eric.smith
versions: +Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13927
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2012-02-02 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

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

--
nosy: +georg.brandl

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13927
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com