I think you can leave out the Date-conversion in the python-script and put
it into the processing file:
In convert_logs.py:
line 86: comment out the conversions, leave date as it is, delete the
conversions
date = datetime.strptime(date, '%Y-%m-%d %H:%M:%S')
In code_swarm.pde:
line 442: change
void loadRepEvents( String filename1 )
{
XMLElement doc = new XMLElement( this, filename1 );
// <--
for( int i = 0; i < doc.getChildCount(); i++ )
{
XMLElement xml = doc.getChild(i);
String filename = xml.getStringAttribute( "filename" );
String datestr = xml.getStringAttribute( "date" );
long date = Long.parseLong( datestr ); // <--
[...]
to
void loadRepEvents( String filename1 )
{
XMLElement doc = new XMLElement( this, filename1 );
java.text.SimpleDateFormat format = new
java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // <--
for( int i = 0; i < doc.getChildCount(); i++ )
{
XMLElement xml = doc.getChild(i);
String filename = xml.getStringAttribute( "filename" );
String datestr = xml.getStringAttribute( "date" );
long date = format.parse(datestr, new java.text.ParsePosition(0)
).getTime(); // <--
it worked fine for me
Original issue reported on code.google.com by Roland.K...@gmail.com on 26 Jun 2008 at 11:33
Original issue reported on code.google.com by
Roland.K...@gmail.com
on 26 Jun 2008 at 11:33