This is an automated email from the ASF dual-hosted git repository.

struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openjpa.git

commit acf78d8091f29e6a67ae7214ba56b70b6ce5a317
Author: Mark Struberg <[email protected]>
AuthorDate: Sun Mar 31 22:32:17 2019 +0200

    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 8e77c29..0767fd6 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() {

Reply via email to