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

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

This has ended up creating a disconnect with how dates are handled depending on 
the format and the consumer of the data.

Take an ISO88601 formatted String 'foo' which includes an offset.
 * As part of a form post with a TypeHint of Date the offset is preserved
 * The content loader will not preserve the offset
 * The content parser will preserve the offset for foo

Other Date formats do not preserve the offset.

There is a way to update the current usage to the java.time package in Java8, 
that will move these packages to require the Java 8 jre.

 

> 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