From acf78d8091f29e6a67ae7214ba56b70b6ce5a317 Mon Sep 17 00:00:00 2001 From: Mark Struberg Date: Sun, 31 Mar 2019 22:32:17 +0200 Subject: [PATCH] OPENJPA-2713 fix wrong offset after daylight saving switched --- .../src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java index 8e77c2969..0767fd6d7 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java @@ -825,7 +825,7 @@ public class DBDictionary */ public OffsetDateTime getOffsetDateTime(ResultSet rs, int column) throws SQLException { Timestamp tst = rs.getTimestamp(column); - return tst != null ? tst.toLocalDateTime().atOffset(OffsetDateTime.now().getOffset()) : null; + return tst != null ? tst.toLocalDateTime().atZone(ZoneId.systemDefault()).toOffsetDateTime() : null; } private ProxyManager getProxyManager() {