diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5
index 5cd42bc24c..2d81e7b895 100644
--- a/src/assets/i18n/en.json5
+++ b/src/assets/i18n/en.json5
@@ -2775,13 +2775,13 @@
- "process.overview.table.finish" : "Finish time",
+ "process.overview.table.finish" : "Finish time (UTC)",
"process.overview.table.id" : "Process ID",
"process.overview.table.name" : "Name",
- "process.overview.table.start" : "Start time",
+ "process.overview.table.start" : "Start time (UTC)",
"process.overview.table.status" : "Status",
From d3c36248167d2e1a275025bc301018715c25aecb Mon Sep 17 00:00:00 2001
From: Davide Negretti
Date: Tue, 16 Nov 2021 12:53:51 +0100
Subject: [PATCH 3/4] [CST-4903] Test fixed
---
.../process-overview.component.spec.ts | 23 +++++++++----------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/app/process-page/overview/process-overview.component.spec.ts b/src/app/process-page/overview/process-overview.component.spec.ts
index 98e78f6b36..84ef4bca56 100644
--- a/src/app/process-page/overview/process-overview.component.spec.ts
+++ b/src/app/process-page/overview/process-overview.component.spec.ts
@@ -12,12 +12,9 @@ import { By } from '@angular/platform-browser';
import { ProcessStatus } from '../processes/process-status.model';
import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
import { createPaginatedList } from '../../shared/testing/utils.test';
-import { of as observableOf } from 'rxjs';
import { PaginationService } from '../../core/pagination/pagination.service';
-import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
-import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
-import { FindListOptions } from '../../core/data/request.models';
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
+import { DatePipe } from '@angular/common';
describe('ProcessOverviewComponent', () => {
let component: ProcessOverviewComponent;
@@ -30,27 +27,29 @@ describe('ProcessOverviewComponent', () => {
let processes: Process[];
let ePerson: EPerson;
+ const pipe = new DatePipe('en-US');
+
function init() {
processes = [
Object.assign(new Process(), {
processId: 1,
scriptName: 'script-name',
- startTime: '2020-03-19',
- endTime: '2020-03-19',
+ startTime: '2020-03-19 00:30:00',
+ endTime: '2020-03-19 23:30:00',
processStatus: ProcessStatus.COMPLETED
}),
Object.assign(new Process(), {
processId: 2,
scriptName: 'script-name',
- startTime: '2020-03-20',
- endTime: '2020-03-20',
+ startTime: '2020-03-20 00:30:00',
+ endTime: '2020-03-20 23:30:00',
processStatus: ProcessStatus.FAILED
}),
Object.assign(new Process(), {
processId: 3,
scriptName: 'another-script-name',
- startTime: '2020-03-21',
- endTime: '2020-03-21',
+ startTime: '2020-03-21 00:30:00',
+ endTime: '2020-03-21 23:30:00',
processStatus: ProcessStatus.RUNNING
})
];
@@ -135,14 +134,14 @@ describe('ProcessOverviewComponent', () => {
it('should display the start time in the fourth column', () => {
rowElements.forEach((rowElement, index) => {
const el = rowElement.query(By.css('td:nth-child(4)')).nativeElement;
- expect(el.textContent).toContain(processes[index].startTime);
+ expect(el.textContent).toContain(pipe.transform(processes[index].startTime, component.dateFormat, 'UTC'));
});
});
it('should display the end time in the fifth column', () => {
rowElements.forEach((rowElement, index) => {
const el = rowElement.query(By.css('td:nth-child(5)')).nativeElement;
- expect(el.textContent).toContain(processes[index].endTime);
+ expect(el.textContent).toContain(pipe.transform(processes[index].endTime, component.dateFormat, 'UTC'));
});
});
From 08b1025eb30b02bd68c7f4cffeb53cb355dfd456 Mon Sep 17 00:00:00 2001
From: Davide Negretti
Date: Wed, 17 Nov 2021 10:46:36 +0100
Subject: [PATCH 4/4] [CST-4903] Fix
---
src/app/process-page/detail/process-detail.component.html | 4 ++--
src/app/process-page/detail/process-detail.component.ts | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/process-page/detail/process-detail.component.html b/src/app/process-page/detail/process-detail.component.html
index de3aaf23ec..ddf6a0aadc 100644
--- a/src/app/process-page/detail/process-detail.component.html
+++ b/src/app/process-page/detail/process-detail.component.html
@@ -23,11 +23,11 @@
-
{{ process.startTime | date:dateFormat }}
+
{{ process.startTime | date:dateFormat:'UTC' }}
-
{{ process.endTime | date:dateFormat }}
+
{{ process.endTime | date:dateFormat:'UTC' }}
diff --git a/src/app/process-page/detail/process-detail.component.ts b/src/app/process-page/detail/process-detail.component.ts
index 9b6db1becb..b48afe5586 100644
--- a/src/app/process-page/detail/process-detail.component.ts
+++ b/src/app/process-page/detail/process-detail.component.ts
@@ -69,7 +69,7 @@ export class ProcessDetailComponent implements OnInit {
/**
* Date format to use for start and end time of processes
*/
- dateFormat = 'yyyy-MM-dd HH:mm:ss ZZZZZ';
+ dateFormat = 'yyyy-MM-dd HH:mm:ss ZZZZ';
constructor(protected route: ActivatedRoute,
protected router: Router,