mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
Use toISOString instead of toUTCString, as ISO puts it in ISO-8601 format
This commit is contained in:
@@ -184,7 +184,7 @@ describe('SystemWideAlertFormComponent', () => {
|
|||||||
expectedAlert.message = 'New message';
|
expectedAlert.message = 'New message';
|
||||||
expectedAlert.active = true;
|
expectedAlert.active = true;
|
||||||
const countDownTo = new Date(2023, 0, 25, 4, 26);
|
const countDownTo = new Date(2023, 0, 25, 4, 26);
|
||||||
expectedAlert.countdownTo = utcToZonedTime(countDownTo, 'UTC').toUTCString();
|
expectedAlert.countdownTo = utcToZonedTime(countDownTo, 'UTC').toISOString();
|
||||||
|
|
||||||
comp.save();
|
comp.save();
|
||||||
|
|
||||||
@@ -207,7 +207,7 @@ describe('SystemWideAlertFormComponent', () => {
|
|||||||
expectedAlert.message = 'New message';
|
expectedAlert.message = 'New message';
|
||||||
expectedAlert.active = true;
|
expectedAlert.active = true;
|
||||||
const countDownTo = new Date(2023, 0, 25, 4, 26);
|
const countDownTo = new Date(2023, 0, 25, 4, 26);
|
||||||
expectedAlert.countdownTo = utcToZonedTime(countDownTo, 'UTC').toUTCString();
|
expectedAlert.countdownTo = utcToZonedTime(countDownTo, 'UTC').toISOString();
|
||||||
|
|
||||||
comp.save(false);
|
comp.save(false);
|
||||||
|
|
||||||
@@ -254,7 +254,7 @@ describe('SystemWideAlertFormComponent', () => {
|
|||||||
expectedAlert.message = 'New message';
|
expectedAlert.message = 'New message';
|
||||||
expectedAlert.active = true;
|
expectedAlert.active = true;
|
||||||
const countDownTo = new Date(2023, 0, 25, 4, 26);
|
const countDownTo = new Date(2023, 0, 25, 4, 26);
|
||||||
expectedAlert.countdownTo = utcToZonedTime(countDownTo, 'UTC').toUTCString();
|
expectedAlert.countdownTo = utcToZonedTime(countDownTo, 'UTC').toISOString();
|
||||||
|
|
||||||
comp.save();
|
comp.save();
|
||||||
|
|
||||||
@@ -276,7 +276,7 @@ describe('SystemWideAlertFormComponent', () => {
|
|||||||
expectedAlert.message = 'New message';
|
expectedAlert.message = 'New message';
|
||||||
expectedAlert.active = true;
|
expectedAlert.active = true;
|
||||||
const countDownTo = new Date(2023, 0, 25, 4, 26);
|
const countDownTo = new Date(2023, 0, 25, 4, 26);
|
||||||
expectedAlert.countdownTo = utcToZonedTime(countDownTo, 'UTC').toUTCString();
|
expectedAlert.countdownTo = utcToZonedTime(countDownTo, 'UTC').toISOString();
|
||||||
|
|
||||||
comp.save();
|
comp.save();
|
||||||
|
|
||||||
@@ -301,7 +301,7 @@ describe('SystemWideAlertFormComponent', () => {
|
|||||||
expectedAlert.message = 'New message';
|
expectedAlert.message = 'New message';
|
||||||
expectedAlert.active = true;
|
expectedAlert.active = true;
|
||||||
const countDownTo = new Date(2023, 0, 25, 4, 26);
|
const countDownTo = new Date(2023, 0, 25, 4, 26);
|
||||||
expectedAlert.countdownTo = utcToZonedTime(countDownTo, 'UTC').toUTCString();
|
expectedAlert.countdownTo = utcToZonedTime(countDownTo, 'UTC').toISOString();
|
||||||
|
|
||||||
comp.save();
|
comp.save();
|
||||||
|
|
||||||
|
@@ -253,7 +253,7 @@ export class SystemWideAlertFormComponent implements OnInit {
|
|||||||
alert.active = this.formActive.value;
|
alert.active = this.formActive.value;
|
||||||
if (this.counterEnabled$.getValue()) {
|
if (this.counterEnabled$.getValue()) {
|
||||||
const countDownTo = new Date(this.date.year, this.date.month - 1, this.date.day, this.time.hour, this.time.minute);
|
const countDownTo = new Date(this.date.year, this.date.month - 1, this.date.day, this.time.hour, this.time.minute);
|
||||||
alert.countdownTo = utcToZonedTime(countDownTo, 'UTC').toUTCString();
|
alert.countdownTo = utcToZonedTime(countDownTo, 'UTC').toISOString();
|
||||||
} else {
|
} else {
|
||||||
alert.countdownTo = null;
|
alert.countdownTo = null;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user