Subversion Repositories XServices

Compare Revisions

Ignore whitespace Rev 70 → Rev 71

/xservices/trunk/src/java/net/brutex/xservices/ws/impl/DateServiceImpl.java
64,9 → 64,14
public BigInteger getTimestamp() {
Date d = new Date();
long l = d.getTime();
BigInteger timestamp = new BigInteger(Long.toString(l));
return timestamp;
return new BigInteger(Long.toString(l));
}
public BigInteger getTimestamp2() {
Date d = new Date();
long l = d.getTime()/1000;
return new BigInteger(Long.toString(l));
}
 
public GregorianCalendar getInTimezone(GregorianCalendar cal,
/xservices/trunk/src/java/net/brutex/xservices/ws/DateService.java
47,6 → 47,7
public static final String SERVICE_NAME = "DateService";
final String OPERATION_GETDATE = "getDate";
final String OPERATION_GETTIMESTAMP = "getTimestamp";
final String OPERATION_GETTIMESTAMP2 = "getTimestamp2";
final String OPERATION_GETINTIMEZONE = "getInTimezone";
final String OPERATION_FORMATDATE = "formatDate";
final String OPERATION_FORMATDATEADVANCED = "formatDateAdvanced";
81,6 → 82,15
@WebMethod(operationName=OPERATION_GETTIMESTAMP)
@WSDLDocumentation(value="Get milliseconds since 01.01.1970 (Unix timestap).")
public abstract BigInteger getTimestamp();
 
/**
* Get seconds since 01.01.1970.
*
* @return timestamp seconds
*/
@WebMethod(operationName=OPERATION_GETTIMESTAMP2)
@WSDLDocumentation(value="Get seconds since 01.01.1970 (Unix timestap).")
public abstract BigInteger getTimestamp2();
/**
* Display a date time with a different time zone.