chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (CMIS-928) Inconsistent date formats used in AtomPub binding
Date Fri, 17 Jul 2015 14:00:09 GMT

     [ https://issues.apache.org/jira/browse/CMIS-928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Florian Müller resolved CMIS-928.
---------------------------------
       Resolution: Fixed
    Fix Version/s: OpenCMIS 0.14.0

> Inconsistent date formats used in AtomPub binding
> -------------------------------------------------
>
>                 Key: CMIS-928
>                 URL: https://issues.apache.org/jira/browse/CMIS-928
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-server
>    Affects Versions: OpenCMIS 1.0.0
>            Reporter: Gavin Cornwell
>            Assignee: Florian Müller
>            Priority: Minor
>             Fix For: OpenCMIS 0.14.0
>
>         Attachments: cmis-928-patch.diff
>
>
> The date format used is different in a children response compared to a type definition
response.
> When requesting a type, "cmis:document" for example the following date format is used:
> {code}
>   ...
>   <app:edited>Tue, 30 Jun 2015 10:22:34 GMT</app:edited>
>   <atom:updated>Tue, 30 Jun 2015 10:22:34 GMT</atom:updated>
>   ...
> {code}
> whereas the children response is:
> {code}
>   ...
>   <app:edited>2015-03-31T17:11:26.813+01:00</app:edited>
>   <atom:updated>2015-03-31T17:11:26.813+01:00</atom:updated>
>   ...
> {code}
> According to the AtomPub spec (https://tools.ietf.org/html/rfc4287#section-3.3) the format
seen in the children response is correct.
> This is a result of some date handling changes made for the 0.9.0 release (r1454377)
in AtomDocumentBase.java. The {{writeUpdated(long updated)}} method is converting the time
in millis to a HTTP formatted date whereas {{writeUpdated(GregorianCalendar updated)}} defers
to {{XMLUtils.write}} which converts the date to an XML date (as expected).
> I think the solution is to change {{writeUpdated(long updated)}} and {{writePublished(long
published)}} to call {{DateTimeHelper.formatXmlDateTime}}. I have attached a patch with these
changes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message