Hi,
We're using the timestamp widget and it appears that on the live stage (using WebLogic) the time component is being thrown away. On preview stage, the time appears as expected.
The Live DB contains the time component, but the Live API returns just the date (with time = 0:00:00). The preview API returns the date & time. This suggests that the widget and publishing is working fine, however the API is using the wrong format (and throwing away the time component). Is it using java.sql.Date instead of java.util.Date? (or wrong format?)
Also, this only appears to happen on out WebLogic instances. On our VM environments where we're running JBoss, it is returning fine. That said. On the WebLogic instances, the Live application servers are not on the same host as the VCM - whereas the VM has everything on the same host.
Any ideas?
Cheers, Michael.
FWIW: more information:
JSP Run on preview & Live stage:
<%@ page import="
com.vignette.as.client.javabean.ContentType,
com.vignette.as.client.common.ContentInstanceDBQuery,
com.vignette.as.client.common.ref.ContentTypeRef,
com.vignette.as.client.javabean.IPagingList,
com.vignette.as.client.javabean.QueryManager,
java.util.List,
java.util.Iterator,
com.vignette.as.client.javabean.ManagedObject,
java.lang.String"
%><%@ page contentType="text/html" %><%
// Define the CTD
ContentType authorType = (ContentType)ContentType.findByName("MGLINTERAPPMESSAGE");
ContentInstanceDBQuery query = new ContentInstanceDBQuery(new ContentTypeRef(authorType.getId()));
query.addOrderByUserAttribute("ID");
query.addOrderByUserAttribute("DATESTART");
// Add the return attributes which will be set in the content instances.
query.addReturnsUserAttribute("ID");
query.addReturnsUserAttribute("DATESTART");
// Run the query
IPagingList results = QueryManager.execute(query);
// Print out all of the results
int size = results.size();
out.println("<results><answer>Results returned - " + size + "</answer>");
List list = results.asList();
Iterator iterator = list.iterator();
while (iterator.hasNext()) {
ManagedObject obj = (ManagedObject)iterator.next();
String xml = obj.toXML();
String id = obj.getStringValue("ID");
String startdate = obj.getStringValue("DATESTART");
out.println("<item>" + id + ": " + startdate + "</item>" + xml);
}
out.println("</results>");
%>
Output in Preview:
<results><answer>Results returned - 1</answer>
<item>8c37af6502e7e210VgnVCM10000012067b0a____: 2011-03-04 11:43:21.0</item><?xml version="1.0"?>
<MGLINTERAPPMESSAGE><VignVCMId>dc37af6502e7e210VgnVCM10000012067b0aRCRD</VignVCMId><VignStatus>approved</VignStatus><VignLogicalPath>/Sandpit/Mike</VignLogicalPath><VignName>test app message</VignName><ID>8c37af6502e7e210VgnVCM10000012067b0a____</ID><DATESTART>1299199401000</DATESTART></MGLINTERAPPMESSAGE>
</results>
Output in Live:
<results><answer>Results returned - 1</answer>
<item>8c37af6502e7e210VgnVCM10000012067b0a____: 2011-03-04</item><?xml version="1.0"?>
<MGLINTERAPPMESSAGE><VignVCMId>dc37af6502e7e210VgnVCM10000012067b0aRCRD</VignVCMId><VignStatus>approved</VignStatus><VignLogicalPath>/Sandpit/Mike</VignLogicalPath><VignName>test app message</VignName><ID>8c37af6502e7e210VgnVCM10000012067b0a____</ID><DATESTART>1299157200000</DATESTART></MGLINTERAPPMESSAGE>
</results>
Live DB Query results:
ID STARTDATE ENDDATE
---------------------------------------- ------------------- -------------------
8c37af6502e7e210VgnVCM10000012067b0a____ 2011-03-04 11:43:21 2011-03-31 11:43:26