/* * Copyright 2004 - 2007 - M.A.Windhouwer - TDS - University of Amsterdam - LOT * Published under the CDDL Version 1.0 */ import org.ten60.netkernel.layer1.nkf.*; import org.ten60.netkernel.layer1.representation.*; import com.ten60.netkernel.urii.aspect.*; import org.ten60.netkernel.xml.xda.*; import org.ten60.netkernel.xml.representation.*; import com.ten60.netkernel.urii.*; import java.util.Date; import java.text.DateFormat; import java.text.SimpleDateFormat; void main() { Date date= new Date(); try { date = new Date(Long.parseLong(context.sourceAspect("this:param:ms",IAspectXDA.class).getXDA().getText("/ms",true))); } catch (Exception e) { // ignore and use default } DateFormat df = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz"); df.setTimeZone(TimeZone.getTimeZone("GMT")); IURAspect result=new StringAspect(""+df.format(date)+""); INKFResponse resp=context.createResponseFrom(result); resp.setMimeType("text/xml"); context.setResponse(resp); }