[
https://issues.apache.org/jira/browse/SLING-3846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14096365#comment-14096365
]
Alexander Klimetschek edited comment on SLING-3846 at 8/14/14 12:50 AM:
------------------------------------------------------------------------
It might be worth noting that a Date object represents pure utc millis only and
does not carry a timezone offset, as it will be [included in the JCR date
property|http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.6.4.3%20From%20DATE%20To].
The offset will always be taken from the current JVM timezone default (because
of {{Calendar.getInstance()}}), and not be under control of the client code as
it would be when passing Calendar objects.
was (Author: alexander.klimetschek):
It might be worth noting that a Date object represents pure utc millis only and
does not carry a timezone offset, as it will be [included in the JCR date
property|http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.6.4.3%20From%20DATE%20To].
The offset will always be taken from the current JVM default (because of
{{Calendar.getInstance()}}), and not be under control of the client code as it
would be when passing Calendar objects.
> JcrModifiableValueMap: Date object not supported for writing data
> -----------------------------------------------------------------
>
> Key: SLING-3846
> URL: https://issues.apache.org/jira/browse/SLING-3846
> Project: Sling
> Issue Type: Bug
> Components: JCR
> Affects Versions: JCR Resource 2.3.6
> Reporter: Stefan Seifert
> Fix For: JCR Resource 2.3.8
>
> Attachments: SLING-3846_JcrModifiableValueMap_DateConversion.patch
>
>
> the JCR value map implementation supported for a long time accessing date
> values either with Calendar.class or Date.class - the calendar value was
> converted automatically if required.
> this does currently not work when writing values - for writing only Calendar
> objects are supported, no date objects.
> the attached patch ensures that this behavior is symmetric (incl. an unit
> test).
--
This message was sent by Atlassian JIRA
(v6.2#6252)