Fix for date error on job.info call.

git-svn-id: file:///home/svn/framework3/trunk@9916 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Matt Weeks 2010-07-23 21:54:18 +00:00
parent 9b0e9fca55
commit 7f87cb9e55
2 changed files with 10 additions and 1 deletions

Binary file not shown.

View File

@ -7,6 +7,8 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.security.SecureRandom;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
@ -198,7 +200,14 @@ public class RpcConnection {
return new Integer(type.getTextContent());
}else if (typeName.equals("boolean")){
return new Boolean(type.getTextContent().equals("1"));
}else{
}else if (typeName.equals("dateTime.iso8601")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd'T'HH:mm:ss");
try{
return sdf.parse(type.getTextContent());
}catch(ParseException pex){
return type.getTextContent();
}
} else {
throw new MsfException("Error reading val: unknown type " + typeName);
}
}