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 08:24:52 GMT

Hi,

The way this is done in o.a.j.o.plugins.value.Conversions is through

Calendar.getInstance(UTC)

with

TimeZone UTC = TimeZone.getTimeZone("GMT+00:00");


Michael


On 6.9.13 9:36 , Alex Parvulescu wrote:
> Hi,
>
> In OAK-980 Felix raised an interesting question about using
> Calendar.getInstance()
> for a last updated date property, indicating that System.currentTimeMillis()
> is a safer approach.
>
> Out of curiosity I went through the code and found another piece of code
> that relies on the same method: TreeUtil#autoCreateProperty [0]
> I'd like to hear what others think about this, as the auto-created
> properties have far reaching consequences, much more so than the index
> update status.
> Do we have to change there as well?
>
> And probably a bit off topic, what are the condition where users change the
> default timezone on the jvm (as opposed to the entire system directly)?
>
> thanks,
> alex
>
>
> [0]
> http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/TreeUtil.java?view=markup#l288
>

Mime
View raw message