You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/02/23 11:15:18 UTC

[GitHub] [dolphinscheduler] ruanwenjun commented on a change in pull request #8477: [Feature][Server] Custom timezone - Add timezone handler unified

ruanwenjun commented on a change in pull request #8477:
URL: https://github.com/apache/dolphinscheduler/pull/8477#discussion_r812785111



##########
File path: dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DateUtils.java
##########
@@ -431,8 +492,7 @@ public static Date getEndOfHour(Date inputDay) {
      * @return current date
      */
     public static Date getCurrentDate() {
-        return DateUtils.parse(DateUtils.getCurrentTime(),
-            Constants.YYYY_MM_DD_HH_MM_SS);
+        return DateUtils.parse(DateUtils.getCurrentTime(), Constants.YYYY_MM_DD_HH_MM_SS, null);

Review comment:
       There is no need to use `DateUtils.parse`. The Date is not bind with `TimeZone`. So return new Date is OK.




-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org