jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Re: Calendar.getInstance() usage
Date Fri, 06 Sep 2013 14:45:28 GMT

On 6.9.13 4:36 , Alex Parvulescu wrote:
> So judging by the outcome it would make sense to also change the TreeUtil
> class to use 'System.currentTimeMillis()' call, instead of needlessly going
> through the Calendar.

I think it should be

return PropertyStates.createProperty(name, Calendar.getInstance());

in TreeUtil. This should properly deal with the time zone. Using 
System.currentMillis you need to take care of the JCR value conversions 
from long to Calendar manually.


View raw message