[
https://issues.apache.org/jira/browse/SLING-7590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16441579#comment-16441579
]
Stefan Seifert commented on SLING-7590:
---------------------------------------
the content parser accepts both ISO-8601 and the ecma format - because the
sling get servlet by defaults outputs all dates in ecma format, and it should
be possible to use downloaded JSON files directly as input for the content
parser e.g. in sling mock-based unit tests.
so perhaps the solution is to accept ISO-8601 in content loader *as well*,
additionally to the ecma format? for backwards compatibility reasons we cannot
completely remove the ecma support from content loader.
perhaps it's possible to fix the time zone parsing issue in ecma format as well
by fixing the ECMA_DATE_FORMAT constant - the {{GMT'Z'}} part looks wrong to
parse the time zone from the source string. (had not the time to try it myself
yet.)
> 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)