chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gavin Cornwell (JIRA)" <>
Subject [jira] [Created] (CMIS-928) Inconsistent date formats used in AtomPub binding
Date Fri, 17 Jul 2015 13:49:04 GMT
Gavin Cornwell created CMIS-928:

             Summary: Inconsistent date formats used in AtomPub binding
                 Key: CMIS-928
             Project: Chemistry
          Issue Type: Bug
          Components: opencmis-server
    Affects Versions: OpenCMIS 1.0.0
            Reporter: Gavin Cornwell
            Priority: Minor

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:

  <app:edited>Tue, 30 Jun 2015 10:22:34 GMT</app:edited>
  <atom:updated>Tue, 30 Jun 2015 10:22:34 GMT</atom:updated>

whereas the children response is:

According to the AtomPub spec ( 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
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

This message was sent by Atlassian JIRA

View raw message