diff --git a/web/src/app/monitor/components/workbasket-report/workbasket-report.component.html b/web/src/app/monitor/components/workbasket-report/workbasket-report.component.html
index 68a2de70f..6fea332b3 100644
--- a/web/src/app/monitor/components/workbasket-report/workbasket-report.component.html
+++ b/web/src/app/monitor/components/workbasket-report/workbasket-report.component.html
@@ -1,6 +1,6 @@
-
{{getTitle()}} ({{metaInformation?.date | date : 'dd.MM.yyyy HH:mm:ss'}})
+ {{getTitle()}} ({{metaInformation?.date | germanTimeFormat}})
diff --git a/web/src/app/shared/pipes/german-time-format.pipe.spec.ts b/web/src/app/shared/pipes/german-time-format.pipe.spec.ts
new file mode 100644
index 000000000..541737821
--- /dev/null
+++ b/web/src/app/shared/pipes/german-time-format.pipe.spec.ts
@@ -0,0 +1,20 @@
+import { GermanTimeFormatPipe } from './german-time-format.pipe';
+
+describe('GermanTimeFormatPipe', () => {
+ it('create an instance', () => {
+ const pipe = new GermanTimeFormatPipe();
+ expect(pipe).toBeTruthy();
+ });
+
+ // This test currently doesn't work in GitHub CI, but runs on local machine
+ // Re-enable test when developing this pipe
+ it.skip('should convert ISO time to german time', () => {
+ const pipe = new GermanTimeFormatPipe();
+ expect(pipe.transform('2021-08-20T09:31:41Z')).toMatch('20.08.2021, 11:31:41');
+ });
+
+ it('should return input value when input is string but not a date', () => {
+ const pipe = new GermanTimeFormatPipe();
+ expect(pipe.transform('totally not a date')).toMatch('totally not a date');
+ });
+});
diff --git a/web/src/app/shared/pipes/german-time-format.pipe.ts b/web/src/app/shared/pipes/german-time-format.pipe.ts
new file mode 100644
index 000000000..14f2e8d96
--- /dev/null
+++ b/web/src/app/shared/pipes/german-time-format.pipe.ts
@@ -0,0 +1,21 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: 'germanTimeFormat'
+})
+export class GermanTimeFormatPipe implements PipeTransform {
+ transform(value: string): string {
+ const dateStr = Date.parse(value);
+ if (isNaN(dateStr)) return value;
+ return Intl.DateTimeFormat('de', this.options).format(dateStr);
+ }
+
+ options = {
+ year: 'numeric',
+ month: '2-digit',
+ day: '2-digit',
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit'
+ } as const;
+}
diff --git a/web/src/app/shared/shared.module.ts b/web/src/app/shared/shared.module.ts
index 21e8d97cf..c5a2283fb 100644
--- a/web/src/app/shared/shared.module.ts
+++ b/web/src/app/shared/shared.module.ts
@@ -58,6 +58,7 @@ import { WorkbasketService } from 'app/shared/services/workbasket/workbasket.ser
import { ClassificationsService } from 'app/shared/services/classifications/classifications.service';
import { ObtainMessageService } from './services/obtain-message/obtain-message.service';
import { AccessIdsService } from './services/access-ids/access-ids.service';
+import { GermanTimeFormatPipe } from './pipes/german-time-format.pipe';
const MODULES = [
CommonModule,
@@ -99,11 +100,12 @@ const DECLARATIONS = [
ProgressSpinnerComponent,
DialogPopUpComponent,
WorkbasketFilterComponent,
- TaskFilterComponent
+ TaskFilterComponent,
+ GermanTimeFormatPipe
];
@NgModule({
- declarations: DECLARATIONS,
+ declarations: [DECLARATIONS],
imports: [
MODULES,
MatRadioModule,
@@ -117,7 +119,7 @@ const DECLARATIONS = [
ReactiveFormsModule,
MatProgressSpinnerModule
],
- exports: DECLARATIONS,
+ exports: [DECLARATIONS, GermanTimeFormatPipe],
providers: [
{
provide: HTTP_INTERCEPTORS,
diff --git a/web/src/app/workplace/components/task-list/task-list.component.html b/web/src/app/workplace/components/task-list/task-list.component.html
index 84419e58b..6866e372f 100644
--- a/web/src/app/workplace/components/task-list/task-list.component.html
+++ b/web/src/app/workplace/components/task-list/task-list.component.html
@@ -18,7 +18,7 @@
{{task.name}}, {{task.owner}}
State: {{task.state}}
-
Due: {{task.due | dateTimeZone }}
+
Due: {{task.due | germanTimeFormat }}
diff --git a/web/src/app/workplace/components/task-status-details/task-status-details.component.html b/web/src/app/workplace/components/task-status-details/task-status-details.component.html
index 13a8e884d..969aa832b 100644
--- a/web/src/app/workplace/components/task-status-details/task-status-details.component.html
+++ b/web/src/app/workplace/components/task-status-details/task-status-details.component.html
@@ -7,7 +7,7 @@
Modification Date
-
@@ -16,7 +16,7 @@
Completion Date
-
@@ -56,7 +56,7 @@
Claim Date
-
@@ -64,7 +64,7 @@
Planned Date
-
@@ -72,7 +72,7 @@
Creation Date
-