git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/dataminer-pool-manager@152628 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
079ba2faeb
commit
661dacd21b
|
@ -20,6 +20,9 @@ import java.io.ByteArrayOutputStream;
|
|||
import java.io.File;
|
||||
***REMOVED***
|
||||
import java.sql.Timestamp;
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
import javax.ws.rs.core.NewCookie;
|
||||
|
@ -429,9 +432,9 @@ public class SVNUpdater ***REMOVED***
|
|||
***REMOVED***
|
||||
***REMOVED***
|
||||
|
||||
public String generateAlgorithmEntry(Algorithm algorithm, String targetVRE, String category, String algorithm_type,String env) ***REMOVED***
|
||||
public String generateAlgorithmEntry(Algorithm algorithm, String targetVRE, String category, String algorithm_type,String env) throws ParseException ***REMOVED***
|
||||
***REMOVED***Timestamp timestamp = new Timestamp(System.currentTimeMillis());
|
||||
long unixTime = System.currentTimeMillis() / 1000L;
|
||||
***REMOVED***long unixTime = System.currentTimeMillis() / 1000L;
|
||||
|
||||
StringBuffer sb = new StringBuffer("| ");
|
||||
sb.append(algorithm.getName() + " | ");
|
||||
|
@ -442,7 +445,7 @@ public class SVNUpdater ***REMOVED***
|
|||
+ algorithm.getClazz() + " " + targetVRE + " " + algorithm_type + " N "
|
||||
+ algorithm.getPackageURL() + " \"" + algorithm.getDescription() + "\" </notextile> | ");
|
||||
sb.append("none | ");
|
||||
sb.append(unixTime + " | ");
|
||||
sb.append(this.getTimeZone() + " | ");
|
||||
return sb.toString();
|
||||
***REMOVED***
|
||||
|
||||
|
@ -638,9 +641,18 @@ public class SVNUpdater ***REMOVED***
|
|||
***REMOVED***
|
||||
|
||||
|
||||
public String getTimeZone() throws ParseException***REMOVED***
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.getTime();
|
||||
DateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
|
||||
Date fromDate = (Date)formatter.parse(cal.getTime().toString());
|
||||
TimeZone central = TimeZone.getTimeZone("UTC");
|
||||
formatter.setTimeZone(central);
|
||||
System.out.println(formatter.format(fromDate));
|
||||
return formatter.format(fromDate);
|
||||
***REMOVED***
|
||||
|
||||
|
||||
public static void main(String[] args) throws SVNException ***REMOVED***
|
||||
public static void main(String[] args) throws SVNException, ParseException ***REMOVED***
|
||||
|
||||
ServiceConfiguration sc = new ServiceConfiguration("/home/ngalante/workspace/dataminer-pool-manager/src/main/resources/service.properties");
|
||||
|
||||
|
@ -648,12 +660,19 @@ public class SVNUpdater ***REMOVED***
|
|||
|
||||
***REMOVED***File a = new File("/home/ngalante/Desktop/testCiro");
|
||||
***REMOVED***File b = new File ("/home/ngalante/Desktop/testB");
|
||||
long unixTime = System.currentTimeMillis() / 1000L;
|
||||
System.out.println(unixTime);
|
||||
***REMOVED***long unixTime = System.currentTimeMillis() / 1000L;
|
||||
***REMOVED***System.out.println(unixTime);
|
||||
***REMOVED***c.updateAlgorithmFiles(a);
|
||||
***REMOVED***c.updateAlgorithmFiles(b);
|
||||
***REMOVED***Timestamp timestamp = new Timestamp(System.currentTimeMillis());
|
||||
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.getTime();
|
||||
DateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
|
||||
Date fromDate = (Date)formatter.parse(cal.getTime().toString());
|
||||
TimeZone central = TimeZone.getTimeZone("UTC");
|
||||
formatter.setTimeZone(central);
|
||||
System.out.println(formatter.format(fromDate));
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue