Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

update protobuf version #504

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ under the License.

<groupId>io.streamnative.connectors</groupId>
<artifactId>pulsar-flink-parent</artifactId>
<version>1.13.1.0</version>
<version>1.13.3.0</version>

<name>StreamNative :: Pulsar Flink Connector :: Root</name>
<packaging>pom</packaging>
Expand Down Expand Up @@ -91,8 +91,9 @@ under the License.
<slf4j.version>1.7.15</slf4j.version>

<!-- Protobuf support -->
<protobuf.version>3.11.4</protobuf.version>
<protobuf.version>3.16.1</protobuf.version>
<flink-protobuf.version>2.7.6</flink-protobuf.version>
<protobuf-plugin.version>3.11.4</protobuf-plugin.version>

<!-- Default scala versions, must be overwritten by build profiles, so we set something
invalid here -->
Expand Down
2 changes: 1 addition & 1 deletion pulsar-flink-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ under the License.
<plugin>
<groupId>com.github.os72</groupId>
<artifactId>protoc-jar-maven-plugin</artifactId>
<version>${protobuf.version}</version>
<version>${protobuf-plugin.version}</version>
<executions>
<execution>
<id>generate-protobuf-test-sources</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
Expand Down Expand Up @@ -63,7 +66,8 @@ public static Date stringToTime(String s) {
return java.sql.Date.valueOf(s);
}
} else {
return DatatypeConverter.parseDateTime(s).getTime();
LocalDateTime ldt = LocalDateTime.parse(s, DateTimeFormatter.ISO_DATE_TIME);
return Date.from(ldt.toInstant(ZoneOffset.UTC));
}
}

Expand Down