alaahong commented on code in PR #912:
URL: https://github.com/apache/fesod/pull/912#discussion_r3260596067


##########
fesod-sheet/src/main/java/org/apache/fesod/sheet/metadata/data/WriteCellData.java:
##########
@@ -169,7 +170,11 @@ public WriteCellData(Date dateValue) {
             throw new IllegalArgumentException("DateValue can not be null");
         }
         setType(CellDataTypeEnum.DATE);
-        this.dateValue = LocalDateTime.ofInstant(dateValue.toInstant(), 
ZoneId.systemDefault());
+        if (dateValue instanceof java.sql.Date || dateValue instanceof 
java.sql.Time) {
+            this.dateValue = 
LocalDateTime.ofInstant(Instant.ofEpochMilli(dateValue.getTime()), 
ZoneId.systemDefault());
+        } else {
+            this.dateValue = LocalDateTime.ofInstant(dateValue.toInstant(), 
ZoneId.systemDefault());
+        }

Review Comment:
   is any time zone issue here? seems depends on the execution machine



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to