I'm looking at defining an "application" timezone, but I'm not sure 
where the best place is to define it.

org.apache.isis.runtimes.dflt.runtime.context.IsisContext seems like a 
good start. The IsisSession has a getUserProfile, which has a 
Localisation interface (which exposes a getTimeZone() method), but 
this would possibly be the place to keep a per-user timezone, not an 
application-level timezone [is this an artificial distinction?].

My goal is replace all occurrences of:
        "cal.setTimeZone(UTC_TIME_ZONE);"
with a configurable
        "cal.setTimeZone(IsisContext.getTimeZone());"

Likewise, the datastore implementations could provide their own 
getTimeZone() method, which defines the datastore's internal 
timezone.

Comments? Suggestions?

This has an impact on all tests (for example), as it introduces a new 
dependency into those classes that currently just create a UTC 
timezone.

Currently affected ( a quick search for etc/UTC):
./applib/src/main/java/org/apache/isis/applib/fixtures/FixtureClock.java
./applib/src/main/java/org/apache/isis/applib/value/Date.java
./applib/src/main/java/org/apache/isis/applib/value/Time.java
./applib/src/test/java/org/apache/isis/applib/value/TestClock.java
./core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/ValueSemanticsProviderAbstractTemporal.java
./core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/JavaSqlDateValueSemanticsProviderTest.java
./core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/JavaUtilDateValueSemanticsProviderTest.java
./core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/TestClock.java
./runtimes/dflt/objectstores/sql/tests-common/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/common/SqlIntegrationTestCommon.java
./viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/parsers/DateParser.java


Reply via email to