You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by st...@apache.org on 2019/03/31 20:33:57 UTC
[openjpa] 01/02: OPENJPA-2713 fix wrong offset after daylight
saving switched
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 <st...@apache.org>
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() {