diff --git a/src/app/components/shared/datetime-formats/datetime/zoned-datetime/zoned-datetime.component.spec.ts b/src/app/components/shared/datetime-formats/datetime/zoned-datetime/zoned-datetime.component.spec.ts index 1be22b9ec..13ebdafd6 100644 --- a/src/app/components/shared/datetime-formats/datetime/zoned-datetime/zoned-datetime.component.spec.ts +++ b/src/app/components/shared/datetime-formats/datetime/zoned-datetime/zoned-datetime.component.spec.ts @@ -157,9 +157,7 @@ describe("ZonedDateTimeComponent", () => { it("should update correctly when updating from an implicit to explicit timezone", () => { // because we have not set an explicit timezone, the component should default to using the implicit timezone - spectator.component.value = DateTime.fromISO( - "2020-01-01T12:10:11.123+09:30" - ); + spectator.component.value = DateTime.fromISO("2020-01-01T12:10:11.123+09:30"); update(); expect(timeElement()).toHaveExactTrimmedText("2020-01-01 12:10:11"); diff --git a/src/app/components/shared/datetime-formats/time-since/time-since.component.spec.ts b/src/app/components/shared/datetime-formats/time-since/time-since.component.spec.ts index 2764132cd..b80734369 100644 --- a/src/app/components/shared/datetime-formats/time-since/time-since.component.spec.ts +++ b/src/app/components/shared/datetime-formats/time-since/time-since.component.spec.ts @@ -60,6 +60,8 @@ describe("TimeSince", () => { test( "Negative Luxon Duration", Duration.fromObject({ hours: -2, minutes: -10 }), "2 hours 10 minutes ago", "2019-12-31 21:50:00.000 +09:30 Australia/Darwin", "-PT2H10M"), test( "Unbalanced Luxon Duration", Duration.fromObject({ minutes: 300, seconds: 3600 }), "6 hours from now", "2020-01-01 06:00:00.000 +09:30 Australia/Darwin", "PT6H"), + test("Local Luxon DateTime", DateTime.fromISO("2019-12-31T14:17:58.000"), "9 hours 42 minutes ago", "2019-12-31 14:17:58.000 +09:30 Australia/Darwin", "-PT9H42M2S"), + // notice how the utc date/time was localized to Australia/Darwin (the test runners timezone) test( "UTC Luxon DateTime", DateTime.fromISO("2019-11-13T14:17:58.000Z"), "1 month 3 weeks ago", "2019-11-13 23:47:58.000 +09:30 Australia/Darwin", "-P1M2W6DT12M2S"),