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

Steve Swinsburg steve.swinsburg at gmail.com
Tue May 7 16:43:44 PDT 2013


Would timezone aware dates actually be useful though? 

There may be many timezones accessing the site meaning the dates and times will be spread around and not reflect what actually happened in the site.

 For example if I logged in at midday in Australia do you want to see that someone logged in at your midnight when it actually happened, or midday when it happened for me but not for you?

I think it's useful seeing the events at the server time, which gives a more accurate pattern of usage. 

Cheers
Steve

Sent from my iPhone

On 08/05/2013, at 3:36, "Cook, Jonathan" <jonrcook at indiana.edu> wrote:

> 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
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"


More information about the sakai-dev mailing list