You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/08/16 19:10:28 UTC

[GitHub] [beam] Abacn commented on a diff in pull request #22738: Fix jdbc date conversion offset 1 day

Abacn commented on code in PR #22738:
URL: https://github.com/apache/beam/pull/22738#discussion_r947163602


##########
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/SchemaUtil.java:
##########
@@ -313,11 +311,11 @@ private static <InputT, BaseT> ResultSetFieldExtractor createLogicalTypeExtracto
   /** Convert SQL date type to Beam DateTime. */
   private static ResultSetFieldExtractor createDateExtractor() {
     return (rs, i) -> {
-      Date date = rs.getDate(i, Calendar.getInstance(TimeZone.getTimeZone(ZoneOffset.UTC)));
+      java.time.LocalDate date = rs.getObject(i, java.time.LocalDate.class);

Review Comment:
   Unfortunately there is import of `org.joda.time.LocalDate` and used everywhere. There is an issue #19215 to eliminate joda.time in release 3.0.0 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org