From 1870491f00f6d583d6ebe9270bf69e13633c1bf7 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 15 Aug 2017 19:58:02 +0200 Subject: [PATCH] Implemented a mechanism to set the offset/time-zone to use for conversions --- .../converters/OffsetDateTimeConverter.java | 5 +- .../juplo/jpa/converters/TimeConversions.java | 114 ++++++++++++++++++ .../converters/ZonedDateTimeConverter.java | 5 +- 3 files changed, 118 insertions(+), 6 deletions(-) create mode 100644 src/main/java/de/juplo/jpa/converters/TimeConversions.java diff --git a/src/main/java/de/juplo/jpa/converters/OffsetDateTimeConverter.java b/src/main/java/de/juplo/jpa/converters/OffsetDateTimeConverter.java index 3228aca..3c4365f 100644 --- a/src/main/java/de/juplo/jpa/converters/OffsetDateTimeConverter.java +++ b/src/main/java/de/juplo/jpa/converters/OffsetDateTimeConverter.java @@ -2,7 +2,6 @@ package de.juplo.jpa.converters; import java.sql.Timestamp; import java.time.OffsetDateTime; -import java.time.ZoneOffset; import javax.persistence.AttributeConverter; import javax.persistence.Converter; @@ -19,7 +18,7 @@ public class OffsetDateTimeConverter implements AttributeConverter