[ 
http://jira.dspace.org/jira/browse/DS-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10854#action_10854
 ] 

Larry Stone commented on DS-393:
--------------------------------

The problem is in the usage of the DCDate utils class.  The old version was 
broken, it gave wrong answers for either GMT or local time, I forget which, but 
it was pretty egregious, so I cleaned up the code a lot and fixed it -- there's 
now a main() with some test functions so you can observe that the functions at 
least perform as documented.

Unfortunately, some existing code had grown bugs to compensate for DCDate's 
bugs.  I thought I got them, but apparently the fix I put in only works west of 
Greenwich..  Here's how it *should* work:

- The submission UI accepts and displays (i.e. for current values to be 
changed) local time
- Timestamps in metadata are GMT (ISO 8601 format) so they are interpreted the 
same if an Item migrates or gets copied between sites
- DCdate assembles components of a timestamp into a "date" object, filling in 
empty month, day, time, etc.  Those can be interpreted as either GMT or local 
time, so the UI should be accepting local time

So it looks like there is a disagreement between 
org.dspace.submit.step.DescribeStep, which parses input values as components of 
local time, and org.dspace.app.xmlui.aspect.submission.submit.DescribeStep, 
which parses out the GMT values of a date from a metadata value to initialize 
UI forms.    It ought to be checked in the JSPUI too.

It's actually working fine for us here in GMT-5:00, so that may have masked a 
problem.  I'll look into it if I have time, but if you can try messing around 
with this code, please do.   

> The issue date in the submission lowers each time the describe page is being 
> displayed
> --------------------------------------------------------------------------------------
>
>                 Key: DS-393
>                 URL: http://jira.dspace.org/jira/browse/DS-393
>             Project: DSpace 1.x
>          Issue Type: Bug
>          Components: DSpace API, XMLUI
>    Affects Versions: 1.6.0
>            Reporter: Ben Bosman
>            Priority: Critical
>
> Each time the describe page containing the issue date field is rendered, the 
> date is being reduced by one. This will e.g. occur when adding authors, 
> moving back and forth between different steps. This is probably related to 
> time-zones.
> Issue experienced on a server with GMT+1

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.dspace.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to