X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webservices%2Fcompbio%2Fstat%2Fcollector%2FJobStat.java;h=72c7ae15d4bdd51511f0b90fbbe9aa0ef9bde3e4;hb=1e1c3681ba25ee1797a46f871b8c80f259afe2ca;hp=25e0aa69bcf5b2df196cff5a9611d6649225eea3;hpb=bd0947557dcf7e83b1cd37b4f266646517d86df6;p=jabaws.git diff --git a/webservices/compbio/stat/collector/JobStat.java b/webservices/compbio/stat/collector/JobStat.java index 25e0aa6..72c7ae1 100644 --- a/webservices/compbio/stat/collector/JobStat.java +++ b/webservices/compbio/stat/collector/JobStat.java @@ -1,9 +1,28 @@ +/* Copyright (c) 2011 Peter Troshin + * + * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0 + * + * This library is free software; you can redistribute it and/or modify it under the terms of the + * Apache License version 2 as published by the Apache Software Foundation + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache + * License for more details. + * + * A copy of the license is in apache_license.txt. It is also available here: + * @see: http://www.apache.org/licenses/LICENSE-2.0.txt + * + * Any republication or derived work distributed in source code form + * must include this copyright and license notice. + */ package compbio.stat.collector; import java.sql.Timestamp; +import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Comparator; import java.util.Date; +import java.util.Locale; import compbio.engine.client.ConfExecutable; import compbio.util.Util; @@ -32,6 +51,9 @@ public class JobStat { } }; + private static DateFormat DATE_TIME = SimpleDateFormat.getDateTimeInstance( + DateFormat.DEFAULT, DateFormat.DEFAULT, Locale.UK); + Services webService; String clusterJobId; String jobname; @@ -210,30 +232,28 @@ public class JobStat { public String getStart() { if (start != ExecutionStatCollector.UNDEFINED) { - return SimpleDateFormat.getDateTimeInstance().format( - new Date(start)); + return DATE_TIME.format(new Date(start)); } return "?"; } public String getFinish() { if (finish != ExecutionStatCollector.UNDEFINED) { - return SimpleDateFormat.getDateTimeInstance().format( - new Date(finish)); + return DATE_TIME.format(new Date(finish)); } return "?"; } public long getInputSize() { if (inputSize != ExecutionStatCollector.UNDEFINED) { - return inputSize / 1000; + return inputSize; } return 0; } public long getResultSize() { if (resultSize > 0) { - return resultSize / 1000; + return resultSize; } return 0; }