Open GoogleCodeExporter opened 8 years ago
Patch has been applied. Please verify.
Original comment by michael....@gmail.com
on 20 Feb 2009 at 2:24
python convert_logs.py -c cvslog.log -o cvslog.xml
Traceback (most recent call last):
File "convert_logs.py", line 408, in <module>
main()
File "convert_logs.py", line 162, in main
date = time.strptime(date_without_plus[0].strip(), '%Y-%m-%d %H:%M:%S')
File "/usr/lib/python2.6/_strptime.py", line 454, in _strptime_time
return _strptime(data_string, format)[0]
File "/usr/lib/python2.6/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data '2005/10/25 12:46:44' does not match format '%Y-%m-%d
%H:%M:%S'
Looks like the problem still exists. The Download says May 2009 so I'm assuming
it has the applied patch
Original comment by Slick...@gmail.com
on 9 Jun 2010 at 4:14
[deleted comment]
Replace lines 161 - 162
date_without_plus = date_parts[1].split("+");
date = time.strptime(date_without_plus[0].strip(), '%Y-%m-%d %H:%M:%S')
with
ymddate = date_parts[1].split(" ")
date = time.strptime(ymddate[0] + " " + ymddate[1], '%Y-%m-%d %H:%M:%S')
The split on + doesn't seem to work. (Escape it?)
Original comment by geopsyc...@gmail.com
on 10 Oct 2010 at 9:03
Follow up to previous comment. This problem looks like an issue of what your
time difference is with GMT. In my case, the variable date_parts[1] contains
2005-04-06 22:14:36 -0500
Splitting on a + leaves the -0500 which causes time.strptime to choke.
Splitting on a - is not good as the date has -'s.
While the change I made is messy, it works.
Original comment by geopsyc...@gmail.com
on 10 Oct 2010 at 10:58
Original issue reported on code.google.com by
code.ninjia@gmail.com
on 1 Feb 2009 at 7:41