SnowMoon-Dev commented on code in PR #9735:
URL: https://github.com/apache/dolphinscheduler/pull/9735#discussion_r857273990


##########
dolphinscheduler-ui-next/src/common/common.ts:
##########
@@ -314,10 +314,14 @@ export const warningTypeList = [
   }
 ]
 
-export const parseTime = (dateTime: string | number) => {
-  if (_.isString(dateTime) === true) {
-    return parseISO(dateTime as string)
-  } else {
-    return new Date(dateTime)
-  }
+export const parseTime = (dateTime: string | number): Date => {
+  return _.isString(dateTime) === true
+    ? parseISO(dateTime as string)
+    : new Date(dateTime)
+}
+
+export const renderTableTime = (
+  dateTime: string | number | null | undefined

Review Comment:
   ok, i'll change it



##########
dolphinscheduler-ui-next/src/views/resource/task-group/option/use-table.ts:
##########
@@ -139,14 +138,8 @@ export function useTable(
             }
 
             item.projectName = projectName
-            item.createTime = format(
-              parseTime(item.createTime),
-              'yyyy-MM-dd HH:mm:ss'
-            )
-            item.updateTime = format(
-              parseTime(item.updateTime),
-              'yyyy-MM-dd HH:mm:ss'
-            )
+            item.createTime = renderTableTime(item.createTime)

Review Comment:
   ok, i'll change it



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