[Building Sakai] Sitestats and date/time functionality in custom reporting

Cook, Jonathan jonrcook at indiana.edu
Tue May 7 10:36:51 PDT 2013


Hi,

An issue surfaced stating that Sitestats is not using specified time in the custom reporting. At first, I thought it was a local issue, but in researching, as far as I can tell even in Sakai, it appears Sitestats does not support a timestamp on events that it collects. For instance, the DATE columns in the SST tables are DATE, which only supports date (i.e. 5/6/2013) Also I found this method that is called when events are copied from SAKAI_EVENT TO SST_EVENTS:

Date date = getTruncatedDate(dateTime);
.
.
.
private Date getTruncatedDate(Date date) {
  if(date == null) return null;
    Calendar c = Calendar.getInstance();
    c.setTime(date);
    c.set(Calendar.HOUR_OF_DAY, 0);
    c.set(Calendar.MINUTE, 0);
    c.set(Calendar.SECOND, 0);
    return c.getTime();
}

So, it seems, even though the sakai_event records the actual time of the event, when the event is copied over to sst_events, the timestamp is not recorded, but intentionally hour, minute, second are removed from the event timestamp during sitestats event processing.

I tinkered a bit and changed the DATE to TIMESTAMP for sitestats processing, but then my summary data was broken. For instance, unique visits. I wonder if someone could confirm? If it is true, then perhaps the timestamp fields in the custom reporting section of Sitestats should be removed. If you know the particulars on this aspect of Sitestats, let me know.

-Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130507/1e9c340b/attachment.html 


More information about the sakai-dev mailing list