diff --git a/dolphinscheduler-ui/src/js/module/filter/filter.js b/dolphinscheduler-ui/src/js/module/filter/filter.js index af97cb8d41..a37b7649cf 100644 --- a/dolphinscheduler-ui/src/js/module/filter/filter.js +++ b/dolphinscheduler-ui/src/js/module/filter/filter.js @@ -25,9 +25,19 @@ const formatDate = (value, fmt) => { if (value === null) { return '-' } else { - return dayjs(value).format(fmt) + return dayjs(formatISODate(value)).format(fmt) } } +/** + * Formatting iso date + */ +const formatISODate = date => { + let [datetime, timezone] = date.split('+') + if (!timezone || timezone.indexOf(':') >= 0) return date + let hourOfTz = timezone.substring(0, 2) || '00' + let secondOfTz = timezone.substring(2, 4) || '00' + return `${datetime}+${hourOfTz}:${secondOfTz}` +} /** * filter null */