[Building Sakai] RSF date widget for A2 and polls

Sobieralski, Damian Michael dsobiera at indiana.edu
Tue Nov 6 11:18:51 PST 2012


Specifically, the ISO8601TZ element.  After looking at this further the long and short should be 11/9/2012 as these values I assume are what the client will use to display in the UI.  So I don't think those are wrong now.

But the ISO8601TZ value seems flat wrong to me

From: Sobieralski, Damian Michael
Sent: Tuesday, November 06, 2012 2:14 PM
To: 'sakai-dev at collab.sakaiproject.org'
Subject: RSF date widget for A2 and polls

I am noticing an odd edge case problem w/ the rsf date widget.  This shows itself in both polls and assignment 2.

One needs to set things up as follows:

Server let's say ET (experimental seems to be this).
In the worksite set the TZ as Central (-1 TZ behind the server)

Set a poll (or assignment in A2 for that matter) to have a close date of 11/9/2012 at 11:00 pm.
Save

When you go back to the tool's root level in the UI and observe the list for this item, it will display the date as 11/8/2012 11:00 pm.

I notice that when one actually types the time in the UI that it sends an ajax request and gets a response.  It looks like the server via RSF's UVB is magically sending this back.

Here is what I am seeing:

http://127.0.0.1:8080/portal/tool/3c22eff0-d3ce-402f-a215-43e7efedd3b1/UVBview

<root >
  <value  id="fieldDateTransit.closeDate:1:.ISO8601TZ">&quot;2012-11-09T00:00:00.000-0500&quot;</value>
  <value  id="fieldDateTransit.closeDate:1:.long">&quot;November 9, 2012&quot;</value>
  <value  id="fieldDateTransit.closeDate:1:.short">&quot;11\/9\/12&quot;</value>
  <value  id="fieldDateTransit.closeDate:1:.longTime">&quot;11:00:00 PM CST&quot;</value>

</root>

It's the ISO8601TZ (as well as the long and short values) that appear to be wrong.  It is correctly incrementing the time by an hour but not the day. It's Groundhog Daying it again.  It SHOULD read:
  <value  id="fieldDateTransit.closeDate:1:.ISO8601TZ">&quot;2012-11-10T00:00:00.000-0500&quot;</value>
  <value  id="fieldDateTransit.closeDate:1:.long">&quot;November 10, 2012&quot;</value>
  <value  id="fieldDateTransit.closeDate:1:.short">&quot;11\/10\/12&quot;</value>

If I set the date to a non edge case (say 10pm) it comes back correctly and says:

<root >
  <value  id="fieldDateTransit.closeDate:1:.ISO8601TZ">&quot;2012-11-09T23:00:00.000-0500&quot;</value>
  <value  id="fieldDateTransit.closeDate:1:.long">&quot;November 9, 2012&quot;</value>
  <value  id="fieldDateTransit.closeDate:1:.short">&quot;11\/9\/12&quot;</value>
  <value  id="fieldDateTransit.closeDate:1:.longTime">&quot;10:00:00 PM CST&quot;</value>

</root>

Which is correct.  I've tried to figure out where this xml and thus the "bad date math" is being generated so that I can fix it. But it appears beyond me. Does anyone have any ideas?

-Damian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20121106/b030cbd7/attachment.html 


More information about the sakai-dev mailing list