[ 
https://issues.apache.org/jira/browse/SLING-7590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16442411#comment-16442411
 ] 

Jason E Bailey commented on SLING-7590:
---------------------------------------

[[email protected]] This gets confusing because each module has come up 
with it's own way of doing things. The content loader *only* recognizes an 
ISO-8601 format as a Date, but doesn't use the ISO8601 utility class, and so it 
doesn't keep the offset. So right now, if you use a GET for JSON and turn 
around and POST that JSON back into sling it won't recognize the date string as 
a date.

Browsers now use the ISO-8601 format for dates and will fall back to the ECMA 
format as a fail over. I don't know why we're returning a JSON date using that 
format because it;s not the format that the XML response used. The XM used the 
ISO-8601. Which is a standard, and we should switch things to use a standard, 
at least as the default.

I'll write something up for the mailing list.

> Content Loaders not respecting time zone for Dates
> --------------------------------------------------
>
>                 Key: SLING-7590
>                 URL: https://issues.apache.org/jira/browse/SLING-7590
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Jason E Bailey
>            Priority: Major
>
> When importing content, the JCR supports the setting of the time zone for a  
> jcr Date. However we currently have several processes that fail to set the 
> time zone correctly.
> org.apache.sling.jcr.contentparser.impl.ParserHelper
>  org.apache.sling.jcr.contentloader.internal.DefaultContentCreator
> org.apache.sling.servlets.post.impl.helper.DateParser
> Take a String based time representation that includes a time offset and 
> convert it to Date that looses that information, before conversion to a 
> Calendar object.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to