davidzollo commented on code in PR #9654:
URL: https://github.com/apache/seatunnel/pull/9654#discussion_r2249534346


##########
seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/data/RowConverter.java:
##########
@@ -430,11 +429,7 @@ private OffsetDateTime convertOffsetDateTime(Object value) 
{
         } else if (value instanceof OffsetDateTime) {
             return (OffsetDateTime) value;
         } else if (value instanceof LocalDateTime) {
-            // Convert to OffsetDateTime using the system(jvm) default timezone
-            return ((LocalDateTime) value)
-                    .atZone(ZoneId.systemDefault())
-                    .withZoneSameInstant(ZoneOffset.UTC)
-                    .toOffsetDateTime();
+            return ((LocalDateTime) value).atOffset(ZoneOffset.UTC);

Review Comment:
   This is not right, 
     // In Beijing (UTC+8), developer writes:
     LocalDateTime meeting = LocalDateTime.of(2024, 1, 1, 14, 0, 0); // 2 PM 
local
   
     // Original code: Correctly converts to 6 AM UTC
     // Modified code:  Treats as 2 PM UTC (8 hours off!)



-- 
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]

Reply via email to