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

Michael Dürig commented on OAK-1111:
------------------------------------

I think the test expectations are to strict: the returned calendar values 
represent the same date, only the time zone differ. According to the JCR spec: 
"If V1 and V2 are values of type DATE then the repository must use the 
semantics of java.lang.Calendar.compareTo, as described in §3.6.5.1 CompareTo 
Semantics."

Thus the assertion in the test case should read
{code}
assertEquals(0, cal.compareTo(root.getProperty("start").getDate()));
{code}


> Node#setProperty(String, Calendar) doesn't take time zone in account
> --------------------------------------------------------------------
>
>                 Key: OAK-1111
>                 URL: https://issues.apache.org/jira/browse/OAK-1111
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, jcr
>            Reporter: Antonio Sanso
>         Attachments: OAK-1111-test.txt
>
>
> Node#setProperty(String, Calendar) doesn't take time zone in account.
> It looks the Calendar value is straightly stored as a long without take in 
> consideration the time zone,
> Unit test to follow



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to