Hi all,

I have an issue with the ClockService in my application. My machine is running 
on Europe/Berlin timezone (CET).

Following my use case - observed while debugging my code:
I created a DomainObject with properties validFrom and validTo (both joda 
DateTime objects) and used clockService.nowAsDateTime() to initialize them, 
when I inspected the resulting object both properties had timezone UTC, but on 
UI the time was displayed correctly according to my machines timezone.
BUT: Once I persisted the DomainObject, reloaded it using RepositoryService and 
inspected the object's properties again they had Europe/Berlin timezone. So the 
behavior is inconsistent.
By the way nowAsJavaSqlTimestamp() returns the correct time!

The problem is valid both for running integration tests and jetty.

I found that the ClockService (or to be more specific Clock) uses 
org.apache.isis.applib.Defaults to get the timezone and Defaults uses UTC.
When I use Defaults.setTimeZone(DateTimeZone.getDefault()); while running 
integration tests it works as expected.

Currently I'm using Apache ISIS 1.13.2 with H2 in memory database.

Do I miss any configuration property or am I using ClockService wrong?

Thanks & Regards Timothy

______________________________________________________________________
Disclaimer: This email and any attachments are sent in strictest confidence
for the sole use of the addressee and may contain legally privileged,
confidential, and proprietary data. If you are not the intended recipient,
please advise the sender by replying promptly to this email and then delete
and destroy this email and any attachments without any further use, copying
or forwarding.

Reply via email to