ruanwenjun commented on code in PR #12220:
URL: https://github.com/apache/dolphinscheduler/pull/12220#discussion_r984127935
##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DateUtils.java:
##########
@@ -646,4 +646,23 @@ public static long toDurationHours(long d) {
}
+ /**
+ * transform timeStamp to local date
+ *
+ * @param timeStamp time stamp (milliseconds)
+ * @return local date
+ */
+ public static Date timeStampToLocalDate(long timeStamp) {
+ return timeStamp == 0L ? null : new
Date(Long.parseLong(String.valueOf(timeStamp)));
+ }
Review Comment:
```suggestion
public static @Nuallable Date timeStampToDate(long timeStamp) {
return timeStamp <= 0L ? null : new Date(timeStamp);
}
```
--
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]