diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/ConversionManager.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/ConversionManager.java index 409e9b56d4c..173f6a84428 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/ConversionManager.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/helper/ConversionManager.java @@ -43,6 +43,7 @@ import java.sql.Timestamp; import java.time.Instant; import java.time.LocalDateTime; +import java.time.OffsetDateTime; import java.time.Year; import java.time.ZoneId; import java.time.ZoneOffset; @@ -838,6 +839,8 @@ protected java.sql.Timestamp convertObjectToTimestamp(Object sourceObject) throw timestamp = Helper.timestampFromLong((Long)sourceObject); } else if (sourceObject instanceof LocalDateTime) { timestamp = Timestamp.valueOf((LocalDateTime) sourceObject); + } else if (sourceObject instanceof OffsetDateTime) { + timestamp = Timestamp.valueOf(((OffsetDateTime)sourceObject).toLocalDateTime()); } else { throw ConversionException.couldNotBeConverted(sourceObject, ClassConstants.TIMESTAMP); }