From f322ab957fe99969b4adc4d1c8bd1dbe8689c551 Mon Sep 17 00:00:00 2001 From: ebarrios Date: Wed, 23 Sep 2020 17:54:43 +0200 Subject: [PATCH] Using moment to parse the date --- .../src/components/WorkflowRunsTable/WorkflowRunsTable.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx b/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx index 59c149da32..254e6f89ed 100644 --- a/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx +++ b/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx @@ -26,6 +26,7 @@ import { useProjectName } from '../useProjectName'; import { Entity } from '@backstage/catalog-model'; import { Substitutions } from '../../api/types'; import { buildRouteRef } from '../../plugin'; +import moment from 'moment'; export type WorkflowRun = { id: string; @@ -94,10 +95,7 @@ const generatedColumns: TableColumn[] = [ title: 'Created', render: (row: Partial) => ( -

- {row.createTime?.substring(6, 7)}/{row.createTime?.substring(8, 10)}/ - {row.createTime?.substring(0, 4)}, {row.createTime?.substring(11, 16)} -

+

{moment(row.createTime).format('DD-MM-YYYY hh:mm:ss')}

), },