ongdisheng commented on code in PR #719:
URL: https://github.com/apache/fesod/pull/719#discussion_r2603194937
##########
fesod/src/main/java/org/apache/fesod/sheet/metadata/data/WriteCellData.java:
##########
@@ -163,7 +164,8 @@ public WriteCellData(Date dateValue) {
throw new IllegalArgumentException("DateValue can not be null");
}
setType(CellDataTypeEnum.DATE);
- this.dateValue = LocalDateTime.ofInstant(dateValue.toInstant(),
ZoneId.systemDefault());
+ // Use getTime() which works for both java.util.Date and java.sql.Date
+ this.dateValue =
LocalDateTime.ofInstant(Instant.ofEpochMilli(dateValue.getTime()),
ZoneId.systemDefault());
Review Comment:
Thank you for the feedback! I'll look into this and explore supporting
`java.sql.Timestamp` as well. Will improve the test examples too.
--
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]