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

Bertrand Delacretaz updated SLING-4258:
---------------------------------------
    Attachment: SLING-4258.patch

Thanks, this looks good! 

I tried to apply your changes with some slight adjustments (minimize diffs to 
JsonObjectCreatorTest.java and activate the new commons.json bundle in tests) 
as the attached SLING-4258.patch, and two integration tests are failing:

* FullTextIndexingTest - might not be related
* JsonQueryServletTest - probably related as that includes json dates stuff

I don't have time to look at this in more detail right now, if you want to have 
a look already the launchpad/integration-tests/README.txt  explains how to run 
these tests individually. 



> JSON representation of Calendar values should preserve timezone
> ---------------------------------------------------------------
>
>                 Key: SLING-4258
>                 URL: https://issues.apache.org/jira/browse/SLING-4258
>             Project: Sling
>          Issue Type: Improvement
>          Components: Commons
>    Affects Versions: Commons JSON 2.0.10
>            Reporter: santiago garcía pimentel
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>             Fix For: Commons JSON 2.0.12
>
>         Attachments: SLING-4258.patch
>
>
> Im currently doing some things with dates in Sling that involve timezones and 
> I find that the documentation regarding it is not particularly clear.
> according to 
> https://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html#date-properties
> several formats are defined. 
> I found that the only format that saves a provided timezone is the ISO8601 
> format, rest of them relies in a Date object, which does not have timezones. 
> Could this be clearly stated?
> Also, the ISO8601 parser is problematic. It relies on the Jackrabbit parser 
> which uses format "±YYYY-MM-DDThh:mm:ss.SSSTZD", but according to 
> http://www.w3.org/TR/NOTE-datetime the ISO format does not have milliseconds 
> on it ("SSS"). So it is very hard to find a way to keep the timezone 
> information (I had to dig through the code to figure it out)
> Could we please replace ISO8601 with the actual format 
> "±YYYY-MM-DDThh:mm:ss.SSSTZD" so it is clearer?



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

Reply via email to