polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [37/50] [abbrv] zest-qi4j git commit: Replaced Joda Time with Java 8 Time API.
Date Fri, 17 Apr 2015 16:08:49 GMT
Replaced Joda Time with Java 8 Time API.


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/b71c878d
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/b71c878d
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/b71c878d

Branch: refs/heads/3.0
Commit: b71c878d306d478e279b692254dd728a431f100b
Parents: 9479a63
Author: Niclas Hedhman <niclas@hedhman.org>
Authored: Sat Oct 4 13:49:30 2014 +0800
Committer: Niclas Hedhman <niclas@hedhman.org>
Committed: Sat Oct 4 13:49:30 2014 +0800

----------------------------------------------------------------------
 core/api/build.gradle                           |   1 -
 core/api/src/docs/valuecomposite.txt            |   3 -
 .../org/qi4j/api/composite/PropertyMapper.java  |  13 -
 .../main/java/org/qi4j/api/type/ValueType.java  |   2 +-
 .../org/qi4j/api/unitofwork/UnitOfWork.java     |   3 +-
 .../qi4j/api/unitofwork/UnitOfWorkFactory.java  |   5 +-
 .../src/main/java/org/qi4j/api/util/Dates.java  | 102 ----
 .../org/qi4j/api/value/ValueDeserializer.java   |   3 -
 .../org/qi4j/api/value/ValueSerializer.java     |   3 -
 .../provider/ThisInjectionProviderFactory.java  |   1 +
 .../qi4j/runtime/structure/ModuleInstance.java  |   7 +-
 .../runtime/structure/ModuleUnitOfWork.java     |  17 +-
 .../runtime/unitofwork/BuilderEntityState.java  |   5 +-
 .../runtime/unitofwork/UnitOfWorkInstance.java  |   7 +-
 .../org/qi4j/regression/qi377/IssueTest.java    |  48 +-
 .../runtime/property/PropertyEqualityTest.java  |  74 ++-
 .../org/qi4j/runtime/query/model/Person.java    |   4 +-
 .../java/org/qi4j/spi/entity/EntityState.java   |   4 +-
 .../ConcurrentModificationCheckConcern.java     |   9 +-
 .../DefaultEntityStoreUnitOfWork.java           |   7 +-
 .../spi/entitystore/EntityStateVersions.java    |   5 +-
 .../org/qi4j/spi/entitystore/EntityStore.java   |   3 +-
 .../spi/entitystore/EntityStoreUnitOfWork.java  |   3 +-
 .../entitystore/helpers/DefaultEntityState.java |   7 +-
 .../entitystore/helpers/JSONEntityState.java    |  18 +-
 .../helpers/JSONMapEntityStoreMixin.java        |  14 +-
 .../helpers/MapEntityStoreMixin.java            |  11 +-
 .../spi/value/ValueDeserializerAdapter.java     | 126 ++++-
 .../qi4j/spi/value/ValueSerializerAdapter.java  | 201 +++++---
 .../helpers/JSONManyAssociationStateTest.java   |   7 +-
 .../test/entity/AbstractEntityStoreTest.java    |  30 +-
 .../qi4j/test/indexing/AbstractQueryTest.java   |  48 +-
 .../java/org/qi4j/test/indexing/TestData.java   |  24 +-
 .../org/qi4j/test/indexing/model/Person.java    |  12 +-
 .../test/value/AbstractJsonDateFormatTest.java  |  26 +-
 .../AbstractPlainValueSerializationTest.java    |  43 +-
 ...AbstractValueCompositeSerializationTest.java |  20 +-
 .../qi4j/entitystore/gae/GaeEntityState.java    |  12 +-
 .../entitystore/gae/GaeEntityStoreMixin.java    |   5 +-
 .../gae/GaeEntityStoreUnitOfWork.java           |   7 +-
 .../qi4j/entitystore/neo4j/NeoEntityState.java  |  19 +-
 .../entitystore/neo4j/NeoEntityStoreMixin.java  |   5 +-
 .../neo4j/NeoEntityStoreUnitOfWork.java         |   9 +-
 .../neo4j/test/SimpleNeoStoreTest.java          |   4 -
 .../prefs/PreferencesEntityStoreMixin.java      |  11 +-
 .../entitystore/sql/SQLEntityStoreMixin.java    |   9 +-
 .../sql/internal/DatabaseSQLService.java        |   5 +-
 .../DatabaseSQLServiceStatementsMixin.java      |   9 +-
 .../sql/internal/SQLEntityState.java            |   3 +-
 .../elasticsearch/ElasticSearchIndexer.java     |   3 +-
 .../index/rdf/query/RdfQueryParserFactory.java  |   6 +-
 .../rdf/query/internal/RdfQueryParserImpl.java  |  31 +-
 .../solr/internal/SolrEntityIndexerMixin.java   |   2 +-
 .../index/sql/support/common/QNameInfo.java     |  14 +-
 .../postgresql/PostgreSQLTypeHelper.java        |  45 +-
 .../support/skeletons/AbstractSQLIndexing.java  |   4 +-
 .../support/skeletons/AbstractSQLStartup.java   |  36 +-
 .../skeletons/SQLCompatEntityStateWrapper.java  |   3 +-
 libraries.gradle                                |   2 -
 .../java/org/qi4j/library/alarm/AlarmEvent.java |   4 +-
 .../org/qi4j/library/alarm/AlarmStatus.java     |   6 +-
 .../org/qi4j/library/alarm/AlarmSystem.java     |   4 +-
 .../alarm/ExtendedAlarmModelService.java        |   6 +-
 .../library/alarm/SimpleAlarmModelService.java  |   6 +-
 .../alarm/StandardAlarmModelService.java        |   6 +-
 .../library/alarm/ExtendedAlarmModelTest.java   |   4 +-
 .../library/alarm/SimpleAlarmModelTest.java     |   4 +-
 .../library/alarm/StandardAlarmModelTest.java   |   4 +-
 .../qi4j/library/appbrowser/AppBrowserTest.java |   6 +-
 .../library/circuitbreaker/CircuitBreaker.java  |  26 +-
 .../circuitbreaker/jmx/CircuitBreakerJMX.java   | 189 ++++----
 .../conversion/values/EntityToValueTest.java    |  33 +-
 .../qi4j/library/cxf/divs/DividendsTest.java    |  10 +-
 .../library/cxf/divs/ProjectedDividends.java    |   8 +-
 .../rest/server/DomainEventSourceResource.java  |   4 +-
 .../application/api/ApplicationEvent.java       |   6 +-
 .../factory/ApplicationEventFactoryService.java |   4 +-
 .../replay/ApplicationEventPlayerService.java   |  61 ++-
 .../source/helper/ApplicationEvents.java        |  10 +-
 .../domain/api/UnitOfWorkDomainEventsValue.java |   4 +-
 .../factory/UnitOfWorkNotificationConcern.java  |   3 +-
 .../domain/replay/DomainEventPlayerService.java | 163 +++++--
 .../domain/source/helper/Events.java            |  48 +-
 .../domain/source/helper/EventRouterTest.java   |   5 +-
 .../domain/source/helper/EventsTest.java        |   5 +-
 .../source/helper/UnitOfWorkRouterTest.java     |   5 +-
 .../rdf/entity/EntityTypeSerializer.java        |  18 +-
 .../rdf/entity/EntitySerializerTest.java        |   3 +-
 .../qi4j/library/rest/client/ClientCache.java   | 220 +++++----
 .../responsereader/TableResponseReader.java     | 138 +++---
 .../library/rest/common/table/TableBuilder.java | 427 +++++++++--------
 .../rest/server/api/ResourceValidity.java       |   6 +-
 .../requestreader/DefaultRequestReader.java     |  27 +-
 .../responsewriter/TableResponseWriter.java     |   8 +-
 .../qi4j/library/rest/admin/EntityResource.java |  11 +-
 .../org/qi4j/library/scheduler/Scheduler.java   |   6 +-
 .../qi4j/library/scheduler/SchedulerMixin.java  |  35 +-
 .../library/scheduler/schedule/Schedule.java    |   6 +-
 .../scheduler/schedule/ScheduleFactory.java     |  18 +-
 .../scheduler/schedule/ScheduleTime.java        |  27 +-
 .../scheduler/schedule/cron/CronSchedule.java   |  14 +-
 .../scheduler/schedule/once/OnceSchedule.java   |  10 +-
 .../library/scheduler/timeline/Timeline.java    |  15 +-
 .../timeline/TimelineForScheduleConcern.java    |   3 +-
 .../scheduler/timeline/TimelineRecord.java      |   3 +-
 .../timeline/TimelineScheduleMixin.java         |  32 +-
 .../timeline/TimelineSchedulerServiceMixin.java |  21 +-
 .../qi4j/library/scheduler/SchedulerTest.java   |  21 +-
 .../manual/recipes/createEntity/Accident.java   |   6 +-
 .../dcicargo/pathfinder_a/api/TransitEdge.java  |  14 +-
 .../internal/GraphTraversalServiceImpl.java     |  12 +-
 .../bootstrap/DCISampleApplication_a.java       |   4 -
 .../sample_a/bootstrap/sampledata/BaseData.java |  20 +-
 .../bootstrap/sampledata/BaseDataService.java   | 104 ++--
 .../bootstrap/sampledata/SampleDataService.java |  27 +-
 .../query/dto/HandlingEventDTO.java             |   4 +-
 .../web/booking/BookNewCargoPage.java           |  10 +-
 .../web/booking/CargoDetailsPage.java           |   5 +-
 .../web/booking/CargoListPage.java              |   9 +-
 .../communication/web/booking/RoutePanel.java   |   6 +-
 .../web/handling/RegisterHandlingEventPage.java |   9 +-
 .../web/tracking/HandlingHistoryPanel.java      |   4 +-
 .../web/tracking/TrackCargoPage.java            |   8 +-
 .../context/shipping/booking/BookNewCargo.java  |  25 +-
 .../shipping/booking/BuildDeliverySnapshot.java |  28 +-
 .../handling/RegisterHandlingEvent.java         |  10 +-
 .../context/support/ApplicationEvents.java      |   9 +-
 .../context/support/FoundNoRoutesException.java |  12 +-
 .../RegisterHandlingEventAttemptDTO.java        |   6 +-
 .../context/support/RoutingService.java         |   3 +-
 .../data/shipping/cargo/RouteSpecification.java |   6 +-
 .../data/shipping/delivery/Delivery.java        |   7 +-
 .../delivery/ExpectedHandlingEvent.java         |   4 +-
 .../data/shipping/handling/HandlingEvent.java   |   6 +-
 .../data/shipping/handling/HandlingEvents.java  |  12 +-
 .../data/shipping/itinerary/Itinerary.java      |  22 +-
 .../sample_a/data/shipping/itinerary/Leg.java   |   6 +-
 .../data/shipping/voyage/CarrierMovement.java   |   6 +-
 .../wicket/form/DateTextFieldWithPicker.java    |  32 +-
 .../shipping/booking/BookNewCargoTest.java      |  32 +-
 .../booking/BuildDeliverySnapshotTest.java      | 474 ++++++++++---------
 .../handling/RegisterHandlingEventTest.java     | 139 +++---
 .../pathfinder_b/api/GraphTraversalService.java |   5 +-
 .../dcicargo/pathfinder_b/api/TransitEdge.java  |  15 +-
 .../pathfinder_b/internal/GraphDAO.java         |  15 +-
 .../internal/GraphTraversalServiceImpl.java     |  12 +-
 .../bootstrap/DCISampleApplication_b.java       |   4 -
 .../sample_b/bootstrap/sampledata/BaseData.java |  27 +-
 .../bootstrap/sampledata/SampleDataService.java |  23 +-
 .../query/dto/HandlingEventDTO.java             |   4 +-
 .../web/booking/BookNewCargoPage.java           |   8 +-
 .../web/booking/CargoDetailsPage.java           |   6 +-
 .../web/booking/CargoListPage.java              |   2 +-
 .../communication/web/booking/RoutePanel.java   |   6 +-
 .../IncidentLoggingApplicationMockupPage.java   |  12 +-
 .../web/tracking/HandlingHistoryPanel.java      |   5 +-
 .../web/tracking/TrackCargoPage.java            |   8 +-
 .../interaction/booking/BookNewCargo.java       |  14 +-
 .../booking/routing/AssignCargoToRoute.java     |  28 +-
 .../DeriveUpdatedRouteSpecification.java        |   6 +-
 .../inspection/event/InspectArrivedCargo.java   |   5 +-
 .../inspection/event/InspectCargoInCustoms.java |   5 +-
 .../inspection/event/InspectClaimedCargo.java   |   6 +-
 .../inspection/event/InspectLoadedCargo.java    |  19 +-
 .../inspection/event/InspectReceivedCargo.java  |   6 +-
 .../inspection/event/InspectUnhandledCargo.java |   6 +-
 .../inspection/event/InspectUnloadedCargo.java  |   5 +-
 .../parsing/ParseHandlingEventData.java         |  26 +-
 .../parsing/dto/ParsedHandlingEventData.java    |   6 +-
 .../CannotRegisterHandlingEventException.java   |   9 +-
 .../exception/ChronologicalException.java       |   6 +-
 .../context/service/routing/RoutingService.java |   8 +-
 .../exception/FoundNoRoutesException.java       |  13 +-
 .../data/factory/HandlingEventFactory.java      |  10 +-
 .../RouteSpecificationFactoryService.java       |  16 +-
 .../structure/cargo/RouteSpecification.java     |  32 +-
 .../data/structure/delivery/Delivery.java       |   7 +-
 .../structure/delivery/NextHandlingEvent.java   |   4 +-
 .../data/structure/handling/HandlingEvent.java  |  15 +-
 .../data/structure/itinerary/Itinerary.java     |  20 +-
 .../sample_b/data/structure/itinerary/Leg.java  |   7 +-
 .../data/structure/voyage/CarrierMovement.java  |   6 +-
 .../wicket/form/DateTextFieldWithPicker.java    |  21 +-
 .../bootstrap/test/TestApplication.java         | 202 ++++----
 .../context/test/booking/BookNewCargoTest.java  |   4 +-
 .../booking/routing/AssignCargoToRouteTest.java |  12 +-
 .../routing/RegisterNewDestinationTest.java     |  10 +-
 .../DeriveUpdatedRouteSpecTest.java             |   4 +-
 .../event/InspectArrivedCargoTest.java          |  12 +-
 .../event/InspectCargoInCustomsTest.java        |  12 +-
 .../event/InspectClaimedCargoTest.java          |  14 +-
 .../event/InspectLoadedCargoTest.java           |  38 +-
 .../event/InspectReceivedCargoTest.java         |  20 +-
 .../event/InspectUnhandledCargoTest.java        |  12 +-
 .../event/InspectUnloadedCargoTest.java         |  26 +-
 .../parsing/ParseHandlingEventDataTest.java     |  12 +-
 .../registration/RegisterHandlingEventTest.java |   6 +-
 .../samples/forum/context/view/ViewPost.java    |   4 +-
 .../qi4j/samples/forum/data/entity/Post.java    |   4 +-
 .../forum/domainevent/DomainEventValue.java     |   3 +-
 .../org/qi4j/sample/rental/domain/Booking.java  |   6 +-
 .../java/org/qi4j/sample/rental/domain/Car.java |   6 +-
 .../org/qi4j/sample/rental/domain/Period.java   |   6 +-
 .../qi4j/sample/rental/domain/RentalShop.java   |  18 +-
 .../sample/rental/domain/dev/InitialData.java   |  59 +--
 .../example/actions/HelloWorldAction.java       |   9 +-
 .../struts2/example/actions/IndexAction.java    |  11 +-
 .../example/converters/DateConverter.java       |  17 +-
 .../demo/thirtyminutes/ThirtyMinutesDocs.java   |  15 +-
 209 files changed, 2648 insertions(+), 2296 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/api/build.gradle
----------------------------------------------------------------------
diff --git a/core/api/build.gradle b/core/api/build.gradle
index ccaa0f2..0ad2cd6 100644
--- a/core/api/build.gradle
+++ b/core/api/build.gradle
@@ -3,7 +3,6 @@ jar { manifest { name = "Qi4j Core API"}}
 dependencies {
 
   compile project( ':org.qi4j.core:org.qi4j.core.io' )
-  compile libraries.jodatime
 
   testCompile project( ':org.qi4j.core:org.qi4j.core.testsupport' )
   testCompile project( ':org.qi4j.libraries:org.qi4j.library.constraints' )

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/api/src/docs/valuecomposite.txt
----------------------------------------------------------------------
diff --git a/core/api/src/docs/valuecomposite.txt b/core/api/src/docs/valuecomposite.txt
index cc7166e..4a1e5b8 100644
--- a/core/api/src/docs/valuecomposite.txt
+++ b/core/api/src/docs/valuecomposite.txt
@@ -63,9 +63,6 @@ Plain Values can be one of :
     * BigInteger,
     * BigDecimal,
     * Date,
-    * DateTime (JodaTime),
-    * LocalDateTime (JodaTime),
-    * LocalDate (JodaTime).
 
 TIP: Serialization behaviour can be tuned with options.
 Every +ValueSerializer+ methods can take a +ValueSerializer.Options+ object that contains flags to change how some

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/api/src/main/java/org/qi4j/api/composite/PropertyMapper.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/composite/PropertyMapper.java b/core/api/src/main/java/org/qi4j/api/composite/PropertyMapper.java
index a47db83..87352a1 100644
--- a/core/api/src/main/java/org/qi4j/api/composite/PropertyMapper.java
+++ b/core/api/src/main/java/org/qi4j/api/composite/PropertyMapper.java
@@ -11,7 +11,6 @@ import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -22,7 +21,6 @@ import org.qi4j.api.Qi4j;
 import org.qi4j.api.property.GenericPropertyInfo;
 import org.qi4j.api.property.Property;
 import org.qi4j.api.util.Classes;
-import org.qi4j.api.util.Dates;
 import org.qi4j.api.value.ValueComposite;
 
 /**
@@ -44,7 +42,6 @@ public final class PropertyMapper
         STRATEGY.put( Character.class, new CharMapper() );
         STRATEGY.put( Float.class, new FloatMapper() );
         STRATEGY.put( Double.class, new DoubleMapper() );
-        STRATEGY.put( Date.class, new DateMapper() );
         STRATEGY.put( Boolean.class, new BooleanMapper() );
         STRATEGY.put( BigDecimal.class, new BigDecimalMapper() );
         STRATEGY.put( BigInteger.class, new BigIntegerMapper() );
@@ -427,16 +424,6 @@ public final class PropertyMapper
         }
     }
 
-    private static class DateMapper
-        implements MappingStrategy
-    {
-        @Override
-        public Object map( Composite composite, Type type, String value )
-        {
-            return Dates.fromString( value.trim() );
-        }
-    }
-
     private static class ValueCompositeMapper
         implements MappingStrategy
     {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/api/src/main/java/org/qi4j/api/type/ValueType.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/type/ValueType.java b/core/api/src/main/java/org/qi4j/api/type/ValueType.java
index 5cb4db4..2fe6697 100644
--- a/core/api/src/main/java/org/qi4j/api/type/ValueType.java
+++ b/core/api/src/main/java/org/qi4j/api/type/ValueType.java
@@ -40,7 +40,7 @@ public class ValueType
      *     counterparts are considered as Primitive Value Types.
      * </p>
      * <p>
-     *     Date, BigInteger, BigDecimal and JodaTime types are not considered as Primitive Value Types.
+     *     Date, BigInteger, BigDecimal types are not considered as Primitive Value Types.
      * </p>
      *
      * @return true if object is a primitive value or an array of primitive values

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/api/src/main/java/org/qi4j/api/unitofwork/UnitOfWork.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/unitofwork/UnitOfWork.java b/core/api/src/main/java/org/qi4j/api/unitofwork/UnitOfWork.java
index 8af1db2..0a9f095 100644
--- a/core/api/src/main/java/org/qi4j/api/unitofwork/UnitOfWork.java
+++ b/core/api/src/main/java/org/qi4j/api/unitofwork/UnitOfWork.java
@@ -15,6 +15,7 @@
  */
 package org.qi4j.api.unitofwork;
 
+import java.time.Instant;
 import org.qi4j.api.entity.EntityBuilder;
 import org.qi4j.api.entity.LifecycleException;
 import org.qi4j.api.query.Query;
@@ -85,7 +86,7 @@ public interface UnitOfWork extends MetaInfoHolder, AutoCloseable
      */
     UnitOfWorkFactory unitOfWorkFactory();
 
-    long currentTime();
+    Instant currentTime();
 
     /**
      * Get the Usecase for this UnitOfWork

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/api/src/main/java/org/qi4j/api/unitofwork/UnitOfWorkFactory.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/unitofwork/UnitOfWorkFactory.java b/core/api/src/main/java/org/qi4j/api/unitofwork/UnitOfWorkFactory.java
index a8755d4..4e9f166 100644
--- a/core/api/src/main/java/org/qi4j/api/unitofwork/UnitOfWorkFactory.java
+++ b/core/api/src/main/java/org/qi4j/api/unitofwork/UnitOfWorkFactory.java
@@ -14,6 +14,7 @@
  */
 package org.qi4j.api.unitofwork;
 
+import java.time.Instant;
 import org.qi4j.api.entity.EntityComposite;
 import org.qi4j.api.usecase.Usecase;
 
@@ -41,7 +42,7 @@ public interface UnitOfWorkFactory
      * </p>
      * @return a new UnitOfWork
      */
-    UnitOfWork newUnitOfWork( long currentTime );
+    UnitOfWork newUnitOfWork( Instant currentTime );
 
     /**
      * Create a new UnitOfWork for the given Usecase and associate it with the current thread.
@@ -61,7 +62,7 @@ public interface UnitOfWorkFactory
      *
      * @return a new UnitOfWork
      */
-    UnitOfWork newUnitOfWork( Usecase usecase, long currentTime );
+    UnitOfWork newUnitOfWork( Usecase usecase, Instant currentTime );
 
     /**
      * @return true if there is an active UnitOfWork associated with the executing thread

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/api/src/main/java/org/qi4j/api/util/Dates.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/util/Dates.java b/core/api/src/main/java/org/qi4j/api/util/Dates.java
deleted file mode 100644
index 3324df2..0000000
--- a/core/api/src/main/java/org/qi4j/api/util/Dates.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * Licensed  under the  Apache License,  Version 2.0  (the "License");
- * you may not use  this file  except in  compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed  under the  License is distributed on an "AS IS" BASIS,
- * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.qi4j.api.util;
-
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.TimeZone;
-
-/**
- * Useful methods for handling Dates.
- */
-public final class Dates
-{
-    // Formatters are not thread-safe. Create one per thread
-    private static final ThreadLocal<DateFormat> ISO8601 = new ThreadLocal<DateFormat>()
-    {
-        @Override
-        protected DateFormat initialValue()
-        {
-            return new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSSZ" );
-        }
-    };
-
-    private static final ThreadLocal<DateFormat> ISO8601_UTC = new ThreadLocal<DateFormat>()
-    {
-        @Override
-        protected DateFormat initialValue()
-        {
-            SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" );
-            dateFormat.setTimeZone( TimeZone.getTimeZone( "UTC" ) );
-            return dateFormat;
-        }
-    };
-
-    /**
-     * @param stringDate a string representing a date as either ISO8601, @millis@ or /Date() formats
-     * @return a Date
-     */
-    public static Date fromString( String stringDate )
-    {
-        try
-        {
-            Date date = ISO8601_UTC.get().parse( stringDate );
-            return date;
-        }
-        catch( ParseException e )
-        {
-            try
-            {
-                Date date = ISO8601.get().parse( stringDate );
-                return date;
-            }
-            catch( ParseException e1 )
-            {
-                // @millis@ format
-                if( stringDate.startsWith( "@" ) && stringDate.endsWith( "@" ) )
-                {
-                    long time = Long.parseLong( stringDate.substring( 1, stringDate.length() - 1 ) );
-                    Date date = new Date( time );
-                    return date;
-                }
-                else if( stringDate.startsWith( "/Date(" ) && stringDate.endsWith( ")/" ) ) // Microsoft format
-                {
-                    long time = Long.parseLong( stringDate.substring( 6, stringDate.length() - 2 ) );
-                    Date date = new Date( time );
-                    return date;
-                }
-                throw new IllegalStateException( "Illegal date:" + stringDate );
-            }
-        }
-    }
-
-    /**
-     * @param date a Date
-     * @return String representation in ISO8601 UTC
-     */
-    public static String toUtcString( Date date )
-    {
-        return ISO8601_UTC.get().format( date );
-    }
-
-    private Dates()
-    {
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/api/src/main/java/org/qi4j/api/value/ValueDeserializer.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/value/ValueDeserializer.java b/core/api/src/main/java/org/qi4j/api/value/ValueDeserializer.java
index 48e1203..a6ca6a6 100644
--- a/core/api/src/main/java/org/qi4j/api/value/ValueDeserializer.java
+++ b/core/api/src/main/java/org/qi4j/api/value/ValueDeserializer.java
@@ -53,9 +53,6 @@ import org.qi4j.api.type.ValueType;
  *     <li>BigInteger,</li>
  *     <li>BigDecimal,</li>
  *     <li>Date,</li>
- *     <li>DateTime (JodaTime),</li>
- *     <li>LocalDateTime (JodaTime),</li>
- *     <li>LocalDate (JodaTime).</li>
  * </ul>
  * <p>
  *     Values of unknown types and all arrays are considered as {@link java.io.Serializable} and by so are deserialized

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/api/src/main/java/org/qi4j/api/value/ValueSerializer.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/value/ValueSerializer.java b/core/api/src/main/java/org/qi4j/api/value/ValueSerializer.java
index 06e8599..d9c8f74 100644
--- a/core/api/src/main/java/org/qi4j/api/value/ValueSerializer.java
+++ b/core/api/src/main/java/org/qi4j/api/value/ValueSerializer.java
@@ -54,9 +54,6 @@ import org.qi4j.api.composite.AmbiguousTypeException;
  *     <li>BigInteger,</li>
  *     <li>BigDecimal,</li>
  *     <li>Date,</li>
- *     <li>DateTime (JodaTime),</li>
- *     <li>LocalDateTime (JodaTime),</li>
- *     <li>LocalDate (JodaTime).</li>
  * </ul>
  * <p>
  *     Values of unknown types and all arrays are considered as {@link java.io.Serializable} and by so are serialized to

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/runtime/src/main/java/org/qi4j/runtime/injection/provider/ThisInjectionProviderFactory.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/qi4j/runtime/injection/provider/ThisInjectionProviderFactory.java b/core/runtime/src/main/java/org/qi4j/runtime/injection/provider/ThisInjectionProviderFactory.java
index c927b65..267a7d6 100644
--- a/core/runtime/src/main/java/org/qi4j/runtime/injection/provider/ThisInjectionProviderFactory.java
+++ b/core/runtime/src/main/java/org/qi4j/runtime/injection/provider/ThisInjectionProviderFactory.java
@@ -91,6 +91,7 @@ public final class ThisInjectionProviderFactory
                 }
 
                 proxyConstructor = proxyClass.getConstructor( InvocationHandler.class );
+                proxyConstructor.setAccessible( true );
             }
             catch( Exception e )
             {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/runtime/src/main/java/org/qi4j/runtime/structure/ModuleInstance.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/qi4j/runtime/structure/ModuleInstance.java b/core/runtime/src/main/java/org/qi4j/runtime/structure/ModuleInstance.java
index cfbbb41..efad2f5 100644
--- a/core/runtime/src/main/java/org/qi4j/runtime/structure/ModuleInstance.java
+++ b/core/runtime/src/main/java/org/qi4j/runtime/structure/ModuleInstance.java
@@ -17,6 +17,7 @@ package org.qi4j.runtime.structure;
 
 import java.lang.reflect.AccessibleObject;
 import java.lang.reflect.Type;
+import java.time.Instant;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -509,7 +510,7 @@ public class ModuleInstance
     }
 
     @Override
-    public UnitOfWork newUnitOfWork( long currentTime )
+    public UnitOfWork newUnitOfWork( Instant currentTime )
     {
         return newUnitOfWork( Usecase.DEFAULT, currentTime );
     }
@@ -517,11 +518,11 @@ public class ModuleInstance
     @Override
     public UnitOfWork newUnitOfWork( Usecase usecase )
     {
-        return newUnitOfWork( usecase == null ? Usecase.DEFAULT : usecase, System.currentTimeMillis() );
+        return newUnitOfWork( usecase == null ? Usecase.DEFAULT : usecase, Instant.now() );
     }
 
     @Override
-    public UnitOfWork newUnitOfWork( Usecase usecase, long currentTime )
+    public UnitOfWork newUnitOfWork( Usecase usecase, Instant currentTime )
     {
         UnitOfWorkInstance unitOfWorkInstance = new UnitOfWorkInstance( usecase, currentTime, metricsProvider() );
         return new ModuleUnitOfWork( ModuleInstance.this, unitOfWorkInstance );

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/runtime/src/main/java/org/qi4j/runtime/structure/ModuleUnitOfWork.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/qi4j/runtime/structure/ModuleUnitOfWork.java b/core/runtime/src/main/java/org/qi4j/runtime/structure/ModuleUnitOfWork.java
index 2a333c7..b4486de 100644
--- a/core/runtime/src/main/java/org/qi4j/runtime/structure/ModuleUnitOfWork.java
+++ b/core/runtime/src/main/java/org/qi4j/runtime/structure/ModuleUnitOfWork.java
@@ -15,6 +15,7 @@
  */
 package org.qi4j.runtime.structure;
 
+import java.time.Instant;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.Map;
@@ -59,20 +60,6 @@ import static org.qi4j.functional.Iterables.first;
 public class ModuleUnitOfWork
     implements UnitOfWork
 {
-//    private static final QualifiedName IDENTITY_STATE_NAME;
-//
-//    static
-//    {
-//        try
-//        {
-//            IDENTITY_STATE_NAME = QualifiedName.fromAccessor( Identity.class.getMethod( "identity" ) );
-//        }
-//        catch( NoSuchMethodException e )
-//        {
-//            throw new InternalError( "Qi4j Core Runtime codebase is corrupted. Contact Qi4j team: ModuleUnitOfWork" );
-//        }
-//    }
-//
     private final UnitOfWorkInstance uow;
     private final ModuleInstance moduleInstance;
 
@@ -99,7 +86,7 @@ public class ModuleUnitOfWork
     }
 
     @Override
-    public long currentTime()
+    public Instant currentTime()
     {
         return uow.currentTime();
     }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/runtime/src/main/java/org/qi4j/runtime/unitofwork/BuilderEntityState.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/qi4j/runtime/unitofwork/BuilderEntityState.java b/core/runtime/src/main/java/org/qi4j/runtime/unitofwork/BuilderEntityState.java
index fc2302d..7ab1be4 100644
--- a/core/runtime/src/main/java/org/qi4j/runtime/unitofwork/BuilderEntityState.java
+++ b/core/runtime/src/main/java/org/qi4j/runtime/unitofwork/BuilderEntityState.java
@@ -19,6 +19,7 @@
  */
 package org.qi4j.runtime.unitofwork;
 
+import java.time.Instant;
 import java.util.HashMap;
 import java.util.Map;
 import org.qi4j.api.common.QualifiedName;
@@ -62,9 +63,9 @@ public final class BuilderEntityState
     }
 
     @Override
-    public long lastModified()
+    public Instant lastModified()
     {
-        return 0;
+        return Instant.MIN;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/runtime/src/main/java/org/qi4j/runtime/unitofwork/UnitOfWorkInstance.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/qi4j/runtime/unitofwork/UnitOfWorkInstance.java b/core/runtime/src/main/java/org/qi4j/runtime/unitofwork/UnitOfWorkInstance.java
index 4919860..0311c46 100644
--- a/core/runtime/src/main/java/org/qi4j/runtime/unitofwork/UnitOfWorkInstance.java
+++ b/core/runtime/src/main/java/org/qi4j/runtime/unitofwork/UnitOfWorkInstance.java
@@ -17,6 +17,7 @@
  */
 package org.qi4j.runtime.unitofwork;
 
+import java.time.Instant;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -74,7 +75,7 @@ public final class UnitOfWorkInstance
         return current.get();
     }
 
-    private long currentTime;
+    private Instant currentTime;
     private MetricsProvider metrics;
     final HashMap<EntityReference, EntityInstance> instanceCache;
     final HashMap<EntityStore, EntityStoreUnitOfWork> storeUnitOfWork;
@@ -92,7 +93,7 @@ public final class UnitOfWorkInstance
 
     private List<UnitOfWorkCallback> callbacks;
 
-    public UnitOfWorkInstance( Usecase usecase, long currentTime, MetricsProvider metrics )
+    public UnitOfWorkInstance( Usecase usecase, Instant currentTime, MetricsProvider metrics )
     {
         this.currentTime = currentTime;
         this.open = true;
@@ -104,7 +105,7 @@ public final class UnitOfWorkInstance
         startCapture( metrics );
     }
 
-    public long currentTime()
+    public Instant currentTime()
     {
         return currentTime;
     }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/runtime/src/test/java/org/qi4j/regression/qi377/IssueTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/qi4j/regression/qi377/IssueTest.java b/core/runtime/src/test/java/org/qi4j/regression/qi377/IssueTest.java
index e0a0cba..1bbbf99 100644
--- a/core/runtime/src/test/java/org/qi4j/regression/qi377/IssueTest.java
+++ b/core/runtime/src/test/java/org/qi4j/regression/qi377/IssueTest.java
@@ -19,6 +19,9 @@ package org.qi4j.regression.qi377;
 
 import org.junit.Test;
 import org.qi4j.api.common.UseDefaults;
+import org.qi4j.api.composite.TransientBuilder;
+import org.qi4j.api.injection.scope.This;
+import org.qi4j.api.mixin.Mixins;
 import org.qi4j.api.property.Property;
 import org.qi4j.bootstrap.AssemblyException;
 import org.qi4j.bootstrap.ModuleAssembly;
@@ -35,7 +38,7 @@ public class IssueTest
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
-        module.transients( TeamMember.class );
+        module.transients( TeamMember.class, Company.class );
     }
 
     @Test
@@ -53,6 +56,20 @@ public class IssueTest
         assertThat( p.name().get(), equalTo( "Paul" ) );
     }
 
+    @Test
+    public void propertyPrivateMixinIsolationShouldWork()
+    {
+        TransientBuilder<Company> builder = module.newTransientBuilder( Company.class );
+        Person ceo = builder.prototypeFor( Person.class );
+        ceo.name().set( "Niclas" );
+        Employee secretary = builder.prototypeFor( Employee.class );
+        secretary.name().set( "Babe" );
+        Company company = builder.newInstance();
+
+        assertThat( company.secretaryName(), equalTo( "Babe" ) );
+        assertThat( company.ceoName(), equalTo( "Niclas" ) );
+    }
+
     public interface Person
     {
         @UseDefaults
@@ -70,4 +87,33 @@ public class IssueTest
     {
     }
 
+    @Mixins( Company.Impl.class )
+    public interface Company
+    {
+        String ceoName();
+
+        String secretaryName();
+
+        public abstract class Impl
+            implements Company
+        {
+            @This
+            Person ceo;
+
+            @This
+            Employee sectretary;
+
+            @Override
+            public String ceoName()
+            {
+                return ceo.name().get();
+            }
+
+            @Override
+            public String secretaryName()
+            {
+                return sectretary.name().get();
+            }
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/runtime/src/test/java/org/qi4j/runtime/property/PropertyEqualityTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/qi4j/runtime/property/PropertyEqualityTest.java b/core/runtime/src/test/java/org/qi4j/runtime/property/PropertyEqualityTest.java
index 22de796..61b7763 100644
--- a/core/runtime/src/test/java/org/qi4j/runtime/property/PropertyEqualityTest.java
+++ b/core/runtime/src/test/java/org/qi4j/runtime/property/PropertyEqualityTest.java
@@ -18,10 +18,20 @@ package org.qi4j.runtime.property;
 
 import java.math.BigDecimal;
 import java.math.BigInteger;
-import java.util.Date;
-import org.joda.time.DateTime;
-import org.joda.time.LocalDate;
-import org.joda.time.LocalDateTime;
+import java.time.Duration;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.MonthDay;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.Period;
+import java.time.Year;
+import java.time.YearMonth;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
 import org.junit.Test;
 import org.qi4j.api.common.Optional;
 import org.qi4j.api.property.Property;
@@ -36,7 +46,6 @@ import org.qi4j.test.AbstractQi4jTest;
 import static org.hamcrest.CoreMatchers.allOf;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.not;
-import static org.joda.time.DateTimeZone.UTC;
 import static org.junit.Assert.assertThat;
 
 /**
@@ -97,13 +106,24 @@ public class PropertyEqualityTest
 
         Property<BigDecimal> bigDecimalProperty();
 
-        Property<Date> dateProperty();
+        Property<OffsetDateTime> offsetDateTimeProperty();
+        Property<OffsetTime> offsetTimeProperty();
 
-        Property<DateTime> dateTimeProperty();
+        Property<ZonedDateTime> zonedDateTimeProperty();
 
         Property<LocalDate> localDateProperty();
-
         Property<LocalDateTime> localDateTimeProperty();
+        Property<LocalTime> localTimeProperty();
+
+        Property<Instant> timeInstantProperty();
+        Property<Period> timePeriodProperty();
+        Property<Duration> timeDurationProperty();
+
+        Property<MonthDay> monthDayProperty();
+        Property<YearMonth> yearMonthProperty();
+        Property<Year> yearProperty();
+        Property<ZoneId> zoneIdProperty();
+        Property<ZoneOffset> zoneOffsetProperty();
     }
 
     public interface AnotherSome
@@ -330,10 +350,7 @@ public class PropertyEqualityTest
             builder.prototype().enumProperty().set( AnEnum.BAZAR );
             builder.prototype().bigIntegerProperty().set( new BigInteger( "42" ) );
             builder.prototype().bigDecimalProperty().set( new BigDecimal( "42.23" ) );
-            builder.prototype().dateProperty().set( new DateTime( "2020-03-04T13:24:35", UTC ).toDate() );
-            builder.prototype().dateTimeProperty().set( new DateTime( "2020-03-04T13:24:35", UTC ) );
-            builder.prototype().localDateProperty().set( new LocalDate( "2020-03-04" ) );
-            builder.prototype().localDateTimeProperty().set( new LocalDateTime( "2020-03-04T13:23:00", UTC ) );
+            establihDateTimes( builder );
             some = builder.newInstance();
         }
         return some;
@@ -356,10 +373,7 @@ public class PropertyEqualityTest
             builder.prototype().enumProperty().set( AnEnum.CATHEDRAL );
             builder.prototype().bigIntegerProperty().set( new BigInteger( "23" ) );
             builder.prototype().bigDecimalProperty().set( new BigDecimal( "23.42" ) );
-            builder.prototype().dateProperty().set( new DateTime( "2030-02-08T09:09:09", UTC ).toDate() );
-            builder.prototype().dateTimeProperty().set( new DateTime( "2030-02-08T09:09:09", UTC ) );
-            builder.prototype().localDateProperty().set( new LocalDate( "2030-02-08" ) );
-            builder.prototype().localDateTimeProperty().set( new LocalDateTime( "2030-02-08T09:09:09", UTC ) );
+            establihDateTimes( builder );
             some = builder.newInstance();
         }
         return some;
@@ -382,10 +396,7 @@ public class PropertyEqualityTest
             builder.prototype().enumProperty().set( AnEnum.BAZAR );
             builder.prototype().bigIntegerProperty().set( new BigInteger( "42" ) );
             builder.prototype().bigDecimalProperty().set( new BigDecimal( "42.23" ) );
-            builder.prototype().dateProperty().set( new DateTime( "2020-03-04T13:24:35", UTC ).toDate() );
-            builder.prototype().dateTimeProperty().set( new DateTime( "2020-03-04T13:24:35", UTC ) );
-            builder.prototype().localDateProperty().set( new LocalDate( "2020-03-04" ) );
-            builder.prototype().localDateTimeProperty().set( new LocalDateTime( "2020-03-04T13:23:00", UTC ) );
+            establihDateTimes( builder );
             anotherSome = builder.newInstance();
         }
         return anotherSome;
@@ -408,10 +419,7 @@ public class PropertyEqualityTest
             builder.prototype().enumProperty().set( AnEnum.CATHEDRAL );
             builder.prototype().bigIntegerProperty().set( new BigInteger( "23" ) );
             builder.prototype().bigDecimalProperty().set( new BigDecimal( "23.42" ) );
-            builder.prototype().dateProperty().set( new DateTime( "2030-02-08T09:09:09", UTC ).toDate() );
-            builder.prototype().dateTimeProperty().set( new DateTime( "2030-02-08T09:09:09", UTC ) );
-            builder.prototype().localDateProperty().set( new LocalDate( "2030-02-08" ) );
-            builder.prototype().localDateTimeProperty().set( new LocalDateTime( "2030-02-08T09:09:09", UTC ) );
+            establihDateTimes( builder );
             anotherSome = builder.newInstance();
         }
         return anotherSome;
@@ -427,4 +435,22 @@ public class PropertyEqualityTest
         }
         return other;
     }
+
+    private static void establihDateTimes( ValueBuilder<? extends Some> builder )
+    {
+        builder.prototype().offsetDateTimeProperty().set( OffsetDateTime.parse( "2020-03-04T13:24:35+01:00" ) );
+        builder.prototype().offsetTimeProperty().set( OffsetTime.parse( "13:24:35+01:00" ) );
+        builder.prototype().zonedDateTimeProperty().set( ZonedDateTime.parse( "2020-03-04T13:24:35Z" ) );
+        builder.prototype().localDateProperty().set( LocalDate.parse( "2020-03-04" ) );
+        builder.prototype().localDateTimeProperty().set( LocalDateTime.parse( "2020-03-04T13:23:00" ) );
+        builder.prototype().localTimeProperty().set( LocalTime.parse( "13:23:00" ) );
+        builder.prototype().yearProperty().set( Year.parse( "2020" ) );
+        builder.prototype().yearMonthProperty().set( YearMonth.parse( "2020-03" ) );
+        builder.prototype().monthDayProperty().set( MonthDay.parse( "--03-04" ) );
+        builder.prototype().zoneIdProperty().set( ZoneId.of( "Asia/Kuala_Lumpur" ) );
+        builder.prototype().zoneOffsetProperty().set( ZoneOffset.of( "+02:00" ) );
+        builder.prototype().timePeriodProperty().set( Period.parse( "P3y4w" ) );
+        builder.prototype().timeInstantProperty().set( Instant.parse( "2020-03-04T13:24:35Z" ) );
+        builder.prototype().timeDurationProperty().set( Duration.parse( "P3DT4H" ) );
+    }
 }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/runtime/src/test/java/org/qi4j/runtime/query/model/Person.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/qi4j/runtime/query/model/Person.java b/core/runtime/src/test/java/org/qi4j/runtime/query/model/Person.java
index d8dab13..418a7ce 100644
--- a/core/runtime/src/test/java/org/qi4j/runtime/query/model/Person.java
+++ b/core/runtime/src/test/java/org/qi4j/runtime/query/model/Person.java
@@ -17,7 +17,7 @@
  */
 package org.qi4j.runtime.query.model;
 
-import java.util.Date;
+import java.time.LocalDate;
 import java.util.List;
 import java.util.Map;
 import org.qi4j.api.association.Association;
@@ -48,7 +48,7 @@ public interface Person
     Property<String> email();
 
     @Optional
-    Property<Map<Date, String>> datesToRemember();
+    Property<Map<LocalDate, String>> datesToRemember();
 
     @Optional
     Property<List<String>> tags();

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/spi/src/main/java/org/qi4j/spi/entity/EntityState.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/qi4j/spi/entity/EntityState.java b/core/spi/src/main/java/org/qi4j/spi/entity/EntityState.java
index 2e149ca..052359b 100644
--- a/core/spi/src/main/java/org/qi4j/spi/entity/EntityState.java
+++ b/core/spi/src/main/java/org/qi4j/spi/entity/EntityState.java
@@ -19,6 +19,8 @@
  */
 package org.qi4j.spi.entity;
 
+import java.time.Instant;
+import java.time.ZonedDateTime;
 import org.qi4j.api.common.QualifiedName;
 import org.qi4j.api.entity.EntityDescriptor;
 import org.qi4j.api.entity.EntityReference;
@@ -53,7 +55,7 @@ public interface EntityState
      * </p>
      * @return last modified timestamp of the entity, as defined by System.currentTimeMillis()
      */
-    long lastModified();
+    Instant lastModified();
 
     /**
      * Remove the entity represented by this EntityState when the unit of work is completed.

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/spi/src/main/java/org/qi4j/spi/entitystore/ConcurrentModificationCheckConcern.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/qi4j/spi/entitystore/ConcurrentModificationCheckConcern.java b/core/spi/src/main/java/org/qi4j/spi/entitystore/ConcurrentModificationCheckConcern.java
index cfeead6..35a66dd 100644
--- a/core/spi/src/main/java/org/qi4j/spi/entitystore/ConcurrentModificationCheckConcern.java
+++ b/core/spi/src/main/java/org/qi4j/spi/entitystore/ConcurrentModificationCheckConcern.java
@@ -14,6 +14,7 @@
 
 package org.qi4j.spi.entitystore;
 
+import java.time.Instant;
 import org.qi4j.api.Qi4j;
 import org.qi4j.api.concern.ConcernOf;
 import org.qi4j.api.entity.EntityDescriptor;
@@ -48,7 +49,7 @@ public abstract class ConcurrentModificationCheckConcern
     private Qi4j api;
 
     @Override
-    public EntityStoreUnitOfWork newUnitOfWork( Usecase usecase, Module module, long currentTime )
+    public EntityStoreUnitOfWork newUnitOfWork( Usecase usecase, Module module, Instant currentTime )
     {
         final EntityStoreUnitOfWork uow = next.newUnitOfWork( usecase, module, currentTime );
         return new ConcurrentCheckingEntityStoreUnitOfWork( uow, api.dereference( versions ), module, currentTime );
@@ -60,7 +61,7 @@ public abstract class ConcurrentModificationCheckConcern
         private final EntityStoreUnitOfWork uow;
         private EntityStateVersions versions;
         private Module module;
-        private long currentTime;
+        private Instant currentTime;
 
         private List<EntityState> loaded = new ArrayList<EntityState>();
 
@@ -69,7 +70,7 @@ public abstract class ConcurrentModificationCheckConcern
         public ConcurrentCheckingEntityStoreUnitOfWork( EntityStoreUnitOfWork uow,
                                                         EntityStateVersions versions,
                                                         Module module,
-                                                        long currentTime
+                                                        Instant currentTime
         )
         {
             this.uow = uow;
@@ -85,7 +86,7 @@ public abstract class ConcurrentModificationCheckConcern
         }
 
         @Override
-        public long currentTime()
+        public Instant currentTime()
         {
             return uow.currentTime();
         }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/spi/src/main/java/org/qi4j/spi/entitystore/DefaultEntityStoreUnitOfWork.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/qi4j/spi/entitystore/DefaultEntityStoreUnitOfWork.java b/core/spi/src/main/java/org/qi4j/spi/entitystore/DefaultEntityStoreUnitOfWork.java
index cc93430..5e8c1aa 100644
--- a/core/spi/src/main/java/org/qi4j/spi/entitystore/DefaultEntityStoreUnitOfWork.java
+++ b/core/spi/src/main/java/org/qi4j/spi/entitystore/DefaultEntityStoreUnitOfWork.java
@@ -14,6 +14,7 @@
 
 package org.qi4j.spi.entitystore;
 
+import java.time.Instant;
 import java.util.HashMap;
 import org.qi4j.api.entity.EntityDescriptor;
 import org.qi4j.api.entity.EntityReference;
@@ -32,13 +33,13 @@ public final class DefaultEntityStoreUnitOfWork
     private Module module;
     private HashMap<EntityReference, EntityState> states = new HashMap<>();
     private Usecase usecase;
-    private long currentTime;
+    private Instant currentTime;
 
     public DefaultEntityStoreUnitOfWork( EntityStoreSPI entityStoreSPI,
                                          String identity,
                                          Module module,
                                          Usecase usecase,
-                                         long currentTime
+                                         Instant currentTime
     )
     {
         this.entityStoreSPI = entityStoreSPI;
@@ -60,7 +61,7 @@ public final class DefaultEntityStoreUnitOfWork
     }
 
     @Override
-    public long currentTime()
+    public Instant currentTime()
     {
         return currentTime;
     }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStateVersions.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStateVersions.java b/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStateVersions.java
index ddf1758..9a6e5bc 100644
--- a/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStateVersions.java
+++ b/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStateVersions.java
@@ -14,6 +14,7 @@
 
 package org.qi4j.spi.entitystore;
 
+import java.time.Instant;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -36,7 +37,7 @@ public interface EntityStateVersions
 
     void rememberVersion( EntityReference identity, String version );
 
-    void checkForConcurrentModification( Iterable<EntityState> loaded, Module module, long currentTime )
+    void checkForConcurrentModification( Iterable<EntityState> loaded, Module module, Instant currentTime )
         throws ConcurrentEntityStateModificationException;
 
     /**
@@ -68,7 +69,7 @@ public interface EntityStateVersions
         @Override
         public synchronized void checkForConcurrentModification( Iterable<EntityState> loaded,
                                                                  Module module,
-                                                                 long currentTime
+                                                                 Instant currentTime
         )
             throws ConcurrentEntityStateModificationException
         {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStore.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStore.java b/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStore.java
index fa5ac1b..8da92d0 100644
--- a/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStore.java
+++ b/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStore.java
@@ -16,6 +16,7 @@
  */
 package org.qi4j.spi.entitystore;
 
+import java.time.Instant;
 import org.qi4j.api.structure.Module;
 import org.qi4j.api.usecase.Usecase;
 import org.qi4j.io.Input;
@@ -26,7 +27,7 @@ import org.qi4j.spi.entity.EntityState;
  */
 public interface EntityStore
 {
-    EntityStoreUnitOfWork newUnitOfWork( Usecase usecase, Module module, long currentTime );
+    EntityStoreUnitOfWork newUnitOfWork( Usecase usecase, Module module, Instant currentTime );
 
     Input<EntityState, EntityStoreException> entityStates( Module module );
 }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStoreUnitOfWork.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStoreUnitOfWork.java b/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStoreUnitOfWork.java
index 21655cd..3685721 100644
--- a/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStoreUnitOfWork.java
+++ b/core/spi/src/main/java/org/qi4j/spi/entitystore/EntityStoreUnitOfWork.java
@@ -14,6 +14,7 @@
 
 package org.qi4j.spi.entitystore;
 
+import java.time.Instant;
 import org.qi4j.api.entity.EntityDescriptor;
 import org.qi4j.api.entity.EntityReference;
 import org.qi4j.spi.entity.EntityState;
@@ -25,7 +26,7 @@ public interface EntityStoreUnitOfWork
 {
     String identity();
 
-    long currentTime();
+    Instant currentTime();
 
     /**
      * Create new EntityState for a given identity.

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/DefaultEntityState.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/DefaultEntityState.java b/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/DefaultEntityState.java
index 178ecc6..2b710a1 100644
--- a/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/DefaultEntityState.java
+++ b/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/DefaultEntityState.java
@@ -19,6 +19,7 @@
  */
 package org.qi4j.spi.entitystore.helpers;
 
+import java.time.Instant;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
@@ -45,7 +46,7 @@ public final class DefaultEntityState
     private EntityStatus status;
 
     private String version;
-    private long lastModified;
+    private Instant lastModified;
     private final EntityReference identity;
     private final EntityDescriptor entityDescriptor;
 
@@ -72,7 +73,7 @@ public final class DefaultEntityState
 
     public DefaultEntityState( DefaultEntityStoreUnitOfWork unitOfWork,
                                String version,
-                               long lastModified,
+                               Instant lastModified,
                                EntityReference identity,
                                EntityStatus status,
                                EntityDescriptor entityDescriptor,
@@ -102,7 +103,7 @@ public final class DefaultEntityState
     }
 
     @Override
-    public long lastModified()
+    public Instant lastModified()
     {
         return lastModified;
     }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/JSONEntityState.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/JSONEntityState.java b/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/JSONEntityState.java
index bef6229..dd72cc5 100644
--- a/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/JSONEntityState.java
+++ b/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/JSONEntityState.java
@@ -19,6 +19,7 @@
  */
 package org.qi4j.spi.entitystore.helpers;
 
+import java.time.Instant;
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
@@ -52,14 +53,13 @@ public final class JSONEntityState
         JSONKeys.MODIFIED
     };
 
-    private final DefaultEntityStoreUnitOfWork unitOfWork;
     private final ValueSerialization valueSerialization;
     private final String version;
     private final EntityReference identity;
     private final EntityDescriptor entityDescriptor;
 
     private EntityStatus status;
-    private long lastModified;
+    private Instant lastModified;
     private JSONObject state;
 
     /* package */ JSONEntityState( DefaultEntityStoreUnitOfWork unitOfWork,
@@ -68,8 +68,7 @@ public final class JSONEntityState
                                    EntityDescriptor entityDescriptor,
                                    JSONObject initialState )
     {
-        this( unitOfWork,
-              valueSerialization,
+        this( valueSerialization,
               "",
               unitOfWork.currentTime(),
               identity,
@@ -78,17 +77,15 @@ public final class JSONEntityState
               initialState );
     }
 
-    /* package */ JSONEntityState( DefaultEntityStoreUnitOfWork unitOfWork,
-                                   ValueSerialization valueSerialization,
+    /* package */ JSONEntityState( ValueSerialization valueSerialization,
                                    String version,
-                                   long lastModified,
+                                   Instant lastModified,
                                    EntityReference identity,
                                    EntityStatus status,
                                    EntityDescriptor entityDescriptor,
                                    JSONObject state
     )
     {
-        this.unitOfWork = unitOfWork;
         this.valueSerialization = valueSerialization;
         this.version = version;
         this.lastModified = lastModified;
@@ -106,7 +103,7 @@ public final class JSONEntityState
     }
 
     @Override
-    public long lastModified()
+    public Instant lastModified()
     {
         return lastModified;
     }
@@ -201,10 +198,9 @@ public final class JSONEntityState
                 return null;
             }
 
-            EntityReference value = jsonValue == JSONObject.NULL
+            return jsonValue == JSONObject.NULL
                                     ? null
                                     : EntityReference.parseEntityReference( (String) jsonValue );
-            return value;
         }
         catch( JSONException e )
         {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/JSONMapEntityStoreMixin.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/JSONMapEntityStoreMixin.java b/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/JSONMapEntityStoreMixin.java
index d64617a..e36e9be 100644
--- a/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/JSONMapEntityStoreMixin.java
+++ b/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/JSONMapEntityStoreMixin.java
@@ -25,6 +25,7 @@ import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.io.Reader;
 import java.io.Writer;
+import java.time.Instant;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.UUID;
@@ -143,7 +144,7 @@ public class JSONMapEntityStoreMixin
     // EntityStore
 
     @Override
-    public EntityStoreUnitOfWork newUnitOfWork( Usecase usecaseMetaInfo, Module module, long currentTime )
+    public EntityStoreUnitOfWork newUnitOfWork( Usecase usecaseMetaInfo, Module module, Instant currentTime )
     {
         return new DefaultEntityStoreUnitOfWork( entityStoreSpi, newUnitOfWorkId(), module, usecaseMetaInfo, currentTime );
     }
@@ -292,7 +293,7 @@ public class JSONMapEntityStoreMixin
                             newUnitOfWorkId(),
                             module,
                             usecase,
-                            System.currentTimeMillis() );
+                            Instant.now() );
 
                         final List<EntityState> migrated = new ArrayList<>();
 
@@ -376,14 +377,14 @@ public class JSONMapEntityStoreMixin
         return uuid + Integer.toHexString( count++ );
     }
 
-    protected void writeEntityState( JSONEntityState state, Writer writer, String identity, long lastModified )
+    protected void writeEntityState( JSONEntityState state, Writer writer, String identity, Instant lastModified )
         throws EntityStoreException
     {
         try
         {
             JSONObject jsonState = state.state();
             jsonState.put( JSONKeys.VERSION, identity );
-            jsonState.put( JSONKeys.MODIFIED, lastModified );
+            jsonState.put( JSONKeys.MODIFIED, lastModified.toEpochMilli() );
             writer.append( jsonState.toString() );
         }
         catch( JSONException | IOException e )
@@ -441,10 +442,9 @@ public class JSONMapEntityStoreMixin
                 throw new EntityTypeNotFoundException( type );
             }
 
-            return new JSONEntityState( unitOfWork,
-                                        valueSerialization,
+            return new JSONEntityState( valueSerialization,
                                         version,
-                                        modified,
+                                        Instant.ofEpochMilli(modified),
                                         EntityReference.parseEntityReference( identity ),
                                         status,
                                         entityDescriptor,

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/MapEntityStoreMixin.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/MapEntityStoreMixin.java b/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/MapEntityStoreMixin.java
index b4abf53..8c4c64c 100644
--- a/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/MapEntityStoreMixin.java
+++ b/core/spi/src/main/java/org/qi4j/spi/entitystore/helpers/MapEntityStoreMixin.java
@@ -22,6 +22,7 @@ package org.qi4j.spi.entitystore.helpers;
 import java.io.IOException;
 import java.io.Reader;
 import java.io.Writer;
+import java.time.Instant;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
@@ -117,7 +118,7 @@ public class MapEntityStoreMixin
 
     // EntityStore
     @Override
-    public EntityStoreUnitOfWork newUnitOfWork( Usecase usecaseMetaInfo, Module module, long currentTime )
+    public EntityStoreUnitOfWork newUnitOfWork( Usecase usecaseMetaInfo, Module module, Instant currentTime )
     {
         return new DefaultEntityStoreUnitOfWork( entityStoreSpi, newUnitOfWorkId(), module, usecaseMetaInfo, currentTime );
     }
@@ -221,7 +222,7 @@ public class MapEntityStoreMixin
                             newUnitOfWorkId(),
                             module,
                             usecase,
-                            System.currentTimeMillis() );
+                            Instant.now() );
 
                         final List<EntityState> migrated = new ArrayList<>();
 
@@ -305,7 +306,7 @@ public class MapEntityStoreMixin
         return uuid + Integer.toHexString( count++ );
     }
 
-    protected void writeEntityState( DefaultEntityState state, Writer writer, String version, long lastModified )
+    protected void writeEntityState( DefaultEntityState state, Writer writer, String version, Instant lastModified )
         throws EntityStoreException
     {
         try
@@ -316,7 +317,7 @@ public class MapEntityStoreMixin
                 key( JSONKeys.APPLICATION_VERSION ).value( application.version() ).
                 key( JSONKeys.TYPE ).value( first( state.entityDescriptor().types() ).getName() ).
                 key( JSONKeys.VERSION ).value( version ).
-                key( JSONKeys.MODIFIED ).value( lastModified ).
+                key( JSONKeys.MODIFIED ).value( lastModified.toEpochMilli() ).
                 key( JSONKeys.PROPERTIES ).object();
             EntityDescriptor entityType = state.entityDescriptor();
             for( PropertyDescriptor persistentProperty : entityType.state().properties() )
@@ -392,7 +393,7 @@ public class MapEntityStoreMixin
             EntityStatus status = EntityStatus.LOADED;
 
             String version = jsonObject.getString( JSONKeys.VERSION );
-            long modified = jsonObject.getLong( JSONKeys.MODIFIED );
+            Instant modified = Instant.ofEpochMilli( jsonObject.getLong( JSONKeys.MODIFIED ) );
             String identity = jsonObject.getString( JSONKeys.IDENTITY );
 
             // Check if version is correct

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/spi/src/main/java/org/qi4j/spi/value/ValueDeserializerAdapter.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/qi4j/spi/value/ValueDeserializerAdapter.java b/core/spi/src/main/java/org/qi4j/spi/value/ValueDeserializerAdapter.java
index ce01787..4993654 100644
--- a/core/spi/src/main/java/org/qi4j/spi/value/ValueDeserializerAdapter.java
+++ b/core/spi/src/main/java/org/qi4j/spi/value/ValueDeserializerAdapter.java
@@ -22,10 +22,23 @@ import java.io.InputStream;
 import java.io.ObjectInputStream;
 import java.math.BigDecimal;
 import java.math.BigInteger;
+import java.time.Duration;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.MonthDay;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.Period;
+import java.time.Year;
+import java.time.YearMonth;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Date;
 import java.util.HashMap;
 import java.util.LinkedHashSet;
 import java.util.List;
@@ -34,9 +47,6 @@ import java.util.Scanner;
 import java.util.Set;
 import java.util.function.BiFunction;
 import java.util.function.Function;
-import org.joda.time.DateTime;
-import org.joda.time.LocalDate;
-import org.joda.time.LocalDateTime;
 import org.qi4j.api.association.AssociationDescriptor;
 import org.qi4j.api.entity.EntityReference;
 import org.qi4j.api.injection.scope.Service;
@@ -51,7 +61,6 @@ import org.qi4j.api.type.MapType;
 import org.qi4j.api.type.ValueCompositeType;
 import org.qi4j.api.type.ValueType;
 import org.qi4j.api.util.Base64Encoder;
-import org.qi4j.api.util.Dates;
 import org.qi4j.api.value.ValueBuilder;
 import org.qi4j.api.value.ValueDescriptor;
 import org.qi4j.api.value.ValueDeserializer;
@@ -86,9 +95,6 @@ import static org.qi4j.functional.Iterables.first;
  * <ul>
  *     <li>BigInteger and BigDecimal depends on {@link org.qi4j.api.value.ValueSerializer.Options};</li>
  *     <li>Date as String in ISO-8601, {@literal @millis@} or {@literal /Date(..)} Microsoft format;</li>
- *     <li>DateTime (JodaTime) as a ISO-8601 String with optional timezone offset;</li>
- *     <li>LocalDateTime (JodaTime) as whatever {@link LocalDateTime#LocalDateTime(java.lang.Object)} accept as {@literal instant};</li>
- *     <li>LocalDate (JodaTime) as whatever {@link LocalDate#LocalDate(java.lang.Object)} accept as {@literal instant};</li>
  * </ul>
  *
  * @param <InputType> Implementor pull-parser type
@@ -260,21 +266,28 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
             }
         } );
 
-        // Date types
-        registerDeserializer( Date.class, new Function<Object, Date>()
+        registerDeserializer( ZonedDateTime.class, new Function<Object, ZonedDateTime>()
         {
             @Override
-            public Date apply( Object input )
+            public ZonedDateTime apply( Object input )
             {
-                return Dates.fromString( input.toString() );
+                return ZonedDateTime.parse( input.toString() );
             }
         } );
-        registerDeserializer( DateTime.class, new Function<Object, DateTime>()
+        registerDeserializer( OffsetDateTime.class, new Function<Object, OffsetDateTime>()
         {
             @Override
-            public DateTime apply( Object input )
+            public OffsetDateTime apply( Object input )
             {
-                return DateTime.parse( input.toString() );
+                return OffsetDateTime.parse( input.toString() );
+            }
+        } );
+        registerDeserializer( OffsetTime.class, new Function<Object, OffsetTime>()
+        {
+            @Override
+            public OffsetTime apply( Object input )
+            {
+                return OffsetTime.parse( input.toString() );
             }
         } );
         registerDeserializer( LocalDateTime.class, new Function<Object, LocalDateTime>()
@@ -282,7 +295,15 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
             @Override
             public LocalDateTime apply( Object input )
             {
-                return new LocalDateTime( input );
+                return LocalDateTime.parse( input.toString() );
+            }
+        } );
+        registerDeserializer( LocalTime.class, new Function<Object, LocalTime>()
+        {
+            @Override
+            public LocalTime apply( Object input )
+            {
+                return LocalTime.parse( input.toString() );
             }
         } );
         registerDeserializer( LocalDate.class, new Function<Object, LocalDate>()
@@ -290,7 +311,71 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
             @Override
             public LocalDate apply( Object input )
             {
-                return new LocalDate( input );
+                return LocalDate.parse( input.toString() );
+            }
+        } );
+        registerDeserializer( Duration.class, new Function<Object, Duration>()
+        {
+            @Override
+            public Duration apply( Object input )
+            {
+                return Duration.parse( input.toString() );
+            }
+        } );
+        registerDeserializer( Instant.class, new Function<Object, Instant>()
+        {
+            @Override
+            public Instant apply( Object input )
+            {
+                return Instant.parse( input.toString() );
+            }
+        } );
+        registerDeserializer( MonthDay.class, new Function<Object, MonthDay>()
+        {
+            @Override
+            public MonthDay apply( Object input )
+            {
+                return MonthDay.parse( input.toString() );
+            }
+        } );
+        registerDeserializer( Period.class, new Function<Object, Period>()
+        {
+            @Override
+            public Period apply( Object input )
+            {
+                return Period.parse( input.toString() );
+            }
+        } );
+        registerDeserializer( Year.class, new Function<Object, Year>()
+        {
+            @Override
+            public Year apply( Object input )
+            {
+                return Year.parse( input.toString() );
+            }
+        } );
+        registerDeserializer( YearMonth.class, new Function<Object, YearMonth>()
+        {
+            @Override
+            public YearMonth apply( Object input )
+            {
+                return YearMonth.parse( input.toString() );
+            }
+        } );
+        registerDeserializer( ZoneId.class, new Function<Object, ZoneId>()
+        {
+            @Override
+            public ZoneId apply( Object input )
+            {
+                return ZoneId.of( input.toString() );
+            }
+        } );
+        registerDeserializer( ZoneOffset.class, new Function<Object, ZoneOffset>()
+        {
+            @Override
+            public ZoneOffset apply( Object input )
+            {
+                return ZoneOffset.of( input.toString() );
             }
         } );
 
@@ -483,8 +568,13 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
     private <T> T doDeserialize( ValueType valueType, InputType input )
         throws Exception
     {
-        final Class<?> type = first( valueType.types() );
+        Class<?> type = first( valueType.types() );
         // Registered deserializers
+        if( ( !type.equals( ZoneOffset.class ) ) && ZoneId.class.isAssignableFrom( type ) )
+        {
+            type = ZoneId.class;
+        }
+
         if( deserializers.get( type ) != null )
         {
             Object value = readPlainValue( input );

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/spi/src/main/java/org/qi4j/spi/value/ValueSerializerAdapter.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/qi4j/spi/value/ValueSerializerAdapter.java b/core/spi/src/main/java/org/qi4j/spi/value/ValueSerializerAdapter.java
index 5a1cfea..ce2bc6a 100644
--- a/core/spi/src/main/java/org/qi4j/spi/value/ValueSerializerAdapter.java
+++ b/core/spi/src/main/java/org/qi4j/spi/value/ValueSerializerAdapter.java
@@ -22,14 +22,24 @@ import java.io.ObjectOutputStream;
 import java.io.OutputStream;
 import java.math.BigDecimal;
 import java.math.BigInteger;
-import java.util.Date;
+import java.time.Duration;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.MonthDay;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.Period;
+import java.time.Year;
+import java.time.YearMonth;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.function.BiFunction;
 import java.util.function.Function;
-import org.joda.time.DateTime;
-import org.joda.time.LocalDate;
-import org.joda.time.LocalDateTime;
 import org.qi4j.api.Qi4j;
 import org.qi4j.api.association.Association;
 import org.qi4j.api.association.AssociationDescriptor;
@@ -43,7 +53,6 @@ import org.qi4j.api.entity.Identity;
 import org.qi4j.api.property.Property;
 import org.qi4j.api.property.PropertyDescriptor;
 import org.qi4j.api.util.Base64Encoder;
-import org.qi4j.api.util.Dates;
 import org.qi4j.api.value.ValueComposite;
 import org.qi4j.api.value.ValueDescriptor;
 import org.qi4j.api.value.ValueSerializationException;
@@ -57,29 +66,26 @@ import static org.qi4j.functional.Iterables.first;
  * Adapter for pull-parsing capable ValueSerializers.
  *
  * <p>
- *     Among Plain values (see {@link ValueSerializer}) some are considered primitives to underlying serialization
- *     mechanisms and by so handed/come without conversion to/from implementations. Primitive values can be one of:
+ * Among Plain values (see {@link ValueSerializer}) some are considered primitives to underlying serialization
+ * mechanisms and by so handed/come without conversion to/from implementations. Primitive values can be one of:
  * </p>
  * <ul>
- *     <li>String,</li>
- *     <li>Character or char,</li>
- *     <li>Boolean or boolean,</li>
- *     <li>Integer or int,</li>
- *     <li>Long or long,</li>
- *     <li>Short or short,</li>
- *     <li>Byte or byte,</li>
- *     <li>Float or float,</li>
- *     <li>Double or double.</li>
+ * <li>String,</li>
+ * <li>Character or char,</li>
+ * <li>Boolean or boolean,</li>
+ * <li>Integer or int,</li>
+ * <li>Long or long,</li>
+ * <li>Short or short,</li>
+ * <li>Byte or byte,</li>
+ * <li>Float or float,</li>
+ * <li>Double or double.</li>
  * </ul>
  * <p>
- *     Some other Plain values are transformed before being handed to implementations:
+ * Some other Plain values are transformed before being handed to implementations:
  * </p>
  * <ul>
- *     <li>BigInteger and BigDecimal depends on ValueSerializer.{@link Options};</li>
- *     <li>Date as a ISO-8601 UTC String;</li>
- *     <li>DateTime (JodaTime) as a ISO-8601 String with timezone offset or Z for UTC;</li>
- *     <li>LocalDateTime (JodaTime) as a ISO-8601 String with no timezone offset;</li>
- *     <li>LocalDate (JodaTime) as a ISO-8601 String with no time info;</li>
+ * <li>BigInteger and BigDecimal depends on ValueSerializer.{@link Options};</li>
+ * <li>Date as a ISO-8601 UTC String;</li>
  * </ul>
  *
  * @param <OutputType> Implementor output type
@@ -115,11 +121,11 @@ public abstract class ValueSerializerAdapter<OutputType>
     /**
      * Register a Plain Value type serialization Function.
      *
-     * @param <T> Plain Value parametrized Type
-     * @param type Plain Value Type
+     * @param <T>        Plain Value parametrized Type
+     * @param type       Plain Value Type
      * @param serializer Serialization Function
      */
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     protected final <T> void registerSerializer( Class<T> type, BiFunction<Options, T, Object> serializer )
     {
         serializers.put( type, (BiFunction<Options, Object, Object>) serializer );
@@ -128,11 +134,11 @@ public abstract class ValueSerializerAdapter<OutputType>
     /**
      * Register a Complex Value type serialization Function.
      *
-     * @param <T> Complex Value parametrized Type
-     * @param type Complex Value Type
+     * @param <T>        Complex Value parametrized Type
+     * @param type       Complex Value Type
      * @param serializer Serialization Function
      */
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     protected final <T> void registerComplexSerializer( Class<T> type, ComplexSerializer<T, OutputType> serializer )
     {
         complexSerializers.put( type, (ComplexSerializer<Object, OutputType>) serializer );
@@ -170,28 +176,28 @@ public abstract class ValueSerializerAdapter<OutputType>
         } );
 
         // Date types
-        registerSerializer( Date.class, new BiFunction<Options, Date, Object>()
+        registerSerializer( ZonedDateTime.class, new BiFunction<Options, ZonedDateTime, Object>()
         {
             @Override
-            public Object apply( Options options, Date date )
+            public Object apply( Options options, ZonedDateTime dateTime )
             {
-                return Dates.toUtcString( date );
+                return dateTime.toString();
             }
         } );
-        registerSerializer( DateTime.class, new BiFunction<Options, DateTime, Object>()
+        registerSerializer( LocalDateTime.class, new BiFunction<Options, LocalDateTime, Object>()
         {
             @Override
-            public Object apply( Options options, DateTime date )
+            public Object apply( Options options, LocalDateTime dateTime )
             {
-                return date.toString();
+                return dateTime.toString();
             }
         } );
-        registerSerializer( LocalDateTime.class, new BiFunction<Options, LocalDateTime, Object>()
+        registerSerializer( LocalTime.class, new BiFunction<Options, LocalTime, Object>()
         {
             @Override
-            public Object apply( Options options, LocalDateTime date )
+            public Object apply( Options options, LocalTime time )
             {
-                return date.toString();
+                return time.toString();
             }
         } );
         registerSerializer( LocalDate.class, new BiFunction<Options, LocalDate, Object>()
@@ -202,6 +208,86 @@ public abstract class ValueSerializerAdapter<OutputType>
                 return date.toString();
             }
         } );
+        registerSerializer( OffsetDateTime.class, new BiFunction<Options, OffsetDateTime, Object>()
+        {
+            @Override
+            public Object apply( Options options, OffsetDateTime time )
+            {
+                return time.toString();
+            }
+        } );
+        registerSerializer( OffsetTime.class, new BiFunction<Options, OffsetTime, Object>()
+        {
+            @Override
+            public Object apply( Options options, OffsetTime time )
+            {
+                return time.toString();
+            }
+        } );
+        registerSerializer( Duration.class, new BiFunction<Options, Duration, Object>()
+        {
+            @Override
+            public Object apply( Options options, Duration time )
+            {
+                return time.toString();
+            }
+        } );
+        registerSerializer( Period.class, new BiFunction<Options, Period, Object>()
+        {
+            @Override
+            public Object apply( Options options, Period time )
+            {
+                return time.toString();
+            }
+        } );
+        registerSerializer( Instant.class, new BiFunction<Options, Instant, Object>()
+        {
+            @Override
+            public Object apply( Options options, Instant time )
+            {
+                return time.toString();
+            }
+        } );
+        registerSerializer( MonthDay.class, new BiFunction<Options, MonthDay, Object>()
+        {
+            @Override
+            public Object apply( Options options, MonthDay monthDay )
+            {
+                return monthDay.toString();
+            }
+        } );
+        registerSerializer( Year.class, new BiFunction<Options, Year, Object>()
+        {
+            @Override
+            public Object apply( Options options, Year year )
+            {
+                return year.toString();
+            }
+        } );
+        registerSerializer( YearMonth.class, new BiFunction<Options, YearMonth, Object>()
+        {
+            @Override
+            public Object apply( Options options, YearMonth yearMonth )
+            {
+                return yearMonth.toString();
+            }
+        } );
+        registerSerializer( ZoneId.class, new BiFunction<Options, ZoneId, Object>()
+        {
+            @Override
+            public Object apply( Options options, ZoneId id )
+            {
+                return id.toString();
+            }
+        } );
+        registerSerializer( ZoneOffset.class, new BiFunction<Options, ZoneOffset, Object>()
+        {
+            @Override
+            public Object apply( Options options, ZoneOffset offset )
+            {
+                return offset.toString();
+            }
+        } );
 
         // Other supported types
         registerSerializer( EntityReference.class, new BiFunction<Options, EntityReference, Object>()
@@ -361,54 +447,53 @@ public abstract class ValueSerializerAdapter<OutputType>
     private void doSerialize( Options options, Object object, OutputType output, boolean rootPass )
         throws Exception
     {
-        // Null
         if( object == null )
         {
             LOG.trace( "Null object -> onValue( null )" );
             onValue( output, null );
+            return;
+        }
+
+        Class<?> type = object.getClass();
+        if( ( !type.equals( ZoneOffset.class ) ) && ZoneId.class.isAssignableFrom( type ) )
+        {
+            type = ZoneId.class;
         }
-        else // Registered serializer
-        if( serializers.get( object.getClass() ) != null )
+        if( serializers.get( type ) != null )
         {
             LOG.trace( "Registered serializer matches -> onValue( serialized )" );
-            onValue( output, serializers.get( object.getClass() ).apply( options, object ) );
+            onValue( output, serializers.get( type ).apply( options, object ) );
         }
-        else if( complexSerializers.get( object.getClass() ) != null )
+        else if( complexSerializers.get( type ) != null )
         {
-            complexSerializers.get( object.getClass() ).serialize( options, object, output );
+            complexSerializers.get( type ).serialize( options, object, output );
         }
-        else // ValueComposite
-        if( ValueComposite.class.isAssignableFrom( object.getClass() ) )
+        else if( ValueComposite.class.isAssignableFrom( type ) )
         {
             LOG.trace( "ValueComposite assignable -> serializeValueComposite( object )" );
             serializeValueComposite( options, object, output, rootPass );
         }
-        else // EntityComposite
-        if( EntityComposite.class.isAssignableFrom( object.getClass() ) )
+        else if( EntityComposite.class.isAssignableFrom( type ) )
         {
             LOG.trace( "EntityComposite assignable -> serializeEntityComposite( object )" );
             serializeEntityComposite( object, output );
         }
-        else // Collection - Iterable
-        if( Iterable.class.isAssignableFrom( object.getClass() ) )
+        else if( Iterable.class.isAssignableFrom( type ) )
         {
             LOG.trace( "Iterable assignable -> serializeIterable( object )" );
             serializeIterable( options, object, output );
         }
-        else // Array - QUID Remove this and use java serialization for arrays?
-        if( object.getClass().isArray() )
+        else if( type.isArray() )
         {
             LOG.trace( "Object isArray -> serializeBase64Serializable( object )" );
             serializeBase64Serializable( object, output );
         }
-        else // Map
-        if( Map.class.isAssignableFrom( object.getClass() ) )
+        else if( Map.class.isAssignableFrom( type ) )
         {
             LOG.trace( "Map assignable -> serializeMap( object )" );
             serializeMap( options, object, output );
         }
-        else // Enum
-        if( object.getClass().isEnum() )
+        else if( type.isEnum() )
         {
             LOG.trace( "Object is an enum -> onValue( object.toString() )" );
             onValue( output, object.toString() );
@@ -511,7 +596,7 @@ public abstract class ValueSerializerAdapter<OutputType>
     private void serializeIterable( Options options, Object object, OutputType output )
         throws Exception
     {
-        @SuppressWarnings( "unchecked" )
+        @SuppressWarnings("unchecked")
         Iterable<Object> collection = (Iterable<Object>) object;
         onArrayStart( output );
         for( Object item : collection )
@@ -526,7 +611,7 @@ public abstract class ValueSerializerAdapter<OutputType>
     private void serializeMap( Options options, Object object, OutputType output )
         throws Exception
     {
-        @SuppressWarnings( "unchecked" )
+        @SuppressWarnings("unchecked")
         Map<Object, Object> map = (Map<Object, Object>) object;
         onArrayStart( output );
         for( Map.Entry<Object, Object> entry : map.entrySet() )
@@ -560,7 +645,7 @@ public abstract class ValueSerializerAdapter<OutputType>
         throws Exception
     {
         ByteArrayOutputStream bout = new ByteArrayOutputStream();
-        try( ObjectOutputStream out = new ObjectOutputStream( bout ) )
+        try (ObjectOutputStream out = new ObjectOutputStream( bout ))
         {
             out.writeUnshared( object );
         }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b71c878d/core/spi/src/test/java/org/qi4j/spi/entitystore/helpers/JSONManyAssociationStateTest.java
----------------------------------------------------------------------
diff --git a/core/spi/src/test/java/org/qi4j/spi/entitystore/helpers/JSONManyAssociationStateTest.java b/core/spi/src/test/java/org/qi4j/spi/entitystore/helpers/JSONManyAssociationStateTest.java
index 1fd4613..ebb4bad 100644
--- a/core/spi/src/test/java/org/qi4j/spi/entitystore/helpers/JSONManyAssociationStateTest.java
+++ b/core/spi/src/test/java/org/qi4j/spi/entitystore/helpers/JSONManyAssociationStateTest.java
@@ -15,6 +15,7 @@
  */
 package org.qi4j.spi.entitystore.helpers;
 
+import java.time.Instant;
 import java.util.List;
 import java.util.function.Function;
 import org.json.JSONArray;
@@ -45,9 +46,8 @@ public class JSONManyAssociationStateTest
         state.put( JSONKeys.MANY_ASSOCIATIONS, new JSONObject() );
         state.put( JSONKeys.NAMED_ASSOCIATIONS, new JSONObject() );
         JSONEntityState entityState = new JSONEntityState( null,
-                                                           null,
                                                            "0",
-                                                           System.currentTimeMillis(),
+                                                           Instant.now(),
                                                            EntityReference.parseEntityReference( "123" ),
                                                            EntityStatus.NEW,
                                                            null,
@@ -71,9 +71,8 @@ public class JSONManyAssociationStateTest
         state.put( JSONKeys.MANY_ASSOCIATIONS, new JSONObject() );
         state.put( JSONKeys.NAMED_ASSOCIATIONS, new JSONObject() );
         JSONEntityState entityState = new JSONEntityState( null,
-                                                           null,
                                                            "0",
-                                                           System.currentTimeMillis(),
+                                                           Instant.now(),
                                                            EntityReference.parseEntityReference( "123" ),
                                                            EntityStatus.NEW,
                                                            null,


Mime
View raw message