davidzollo commented on code in PR #9969:
URL: https://github.com/apache/seatunnel/pull/9969#discussion_r2469263397
##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/utils/DateTimeUtils.java:
##########
@@ -314,6 +316,14 @@ public static String toString(LocalDateTime dateTime,
Formatter formatter) {
return dateTime.format(FORMATTER_MAP.get(formatter));
}
+ public static String toString(OffsetDateTime offsetDateTime, Formatter
formatter) {
+ return offsetDateTime.format(FORMATTER_MAP.get(formatter));
+ }
+
+ public static String toString(Temporal temporal, Formatter formatter) {
+ return FORMATTER_MAP.get(formatter).format(temporal);
+ }
Review Comment:
This should consider Zone issue, please refer the implementation of
`DateTimeUtils.toString(long, Formatter)`
```
public static String toString(long timestamp, Formatter formatter) {
Instant instant = Instant.ofEpochMilli(timestamp);
return toString(LocalDateTime.ofInstant(instant,
ZoneId.systemDefault()), formatter);
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]