Giter Site home page Giter Site logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
Patch has been applied. Please verify.

Original comment by [email protected] on 20 Feb 2009 at 2:24

  • Changed state: Started

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
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 [email protected] on 9 Jun 2010 at 4:14

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
[deleted comment]

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
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 [email protected] on 10 Oct 2010 at 9:03

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
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 [email protected] on 10 Oct 2010 at 10:58

from codeswarm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.