From ccce44a1c81d1dd255b2a271c70bf1ff9ade2553 Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Wed, 25 Sep 2024 17:26:36 -0700 Subject: [PATCH] fix: library metadata times are actually displayed in local time (#1309) --- .../component-info/ComponentManagement.test.tsx | 4 ++-- src/library-authoring/generic/status-widget/messages.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/library-authoring/component-info/ComponentManagement.test.tsx b/src/library-authoring/component-info/ComponentManagement.test.tsx index b06934301..314c36de2 100644 --- a/src/library-authoring/component-info/ComponentManagement.test.tsx +++ b/src/library-authoring/component-info/ComponentManagement.test.tsx @@ -29,7 +29,7 @@ describe('', () => { render(); expect(await screen.findByText('Draft')).toBeInTheDocument(); expect(await screen.findByText('(Never Published)')).toBeInTheDocument(); - expect(screen.getByText(matchInnerText('SPAN', 'Draft saved on June 20, 2024 at 13:54 UTC.'))).toBeInTheDocument(); + expect(screen.getByText(matchInnerText('SPAN', 'Draft saved on June 20, 2024 at 13:54.'))).toBeInTheDocument(); }); it('should render published status', async () => { @@ -39,7 +39,7 @@ describe('', () => { expect(await screen.findByText('Published')).toBeInTheDocument(); expect(screen.getByText('Published')).toBeInTheDocument(); expect( - screen.getByText(matchInnerText('SPAN', 'Last published on June 21, 2024 at 24:00 UTC by Luke.')), + screen.getByText(matchInnerText('SPAN', 'Last published on June 21, 2024 at 24:00 by Luke.')), ).toBeInTheDocument(); }); diff --git a/src/library-authoring/generic/status-widget/messages.ts b/src/library-authoring/generic/status-widget/messages.ts index 5ac3b6074..a9af92755 100644 --- a/src/library-authoring/generic/status-widget/messages.ts +++ b/src/library-authoring/generic/status-widget/messages.ts @@ -23,22 +23,22 @@ const messages = defineMessages({ }, lastPublishedMsg: { id: 'course-authoring.library-authoring.generic.status-widget.last-published', - defaultMessage: 'Last published on {date} at {time} UTC by {user}.', + defaultMessage: 'Last published on {date} at {time} by {user}.', description: 'Body message of the library authoring sidebar when the entity is published.', }, lastPublishedMsgWithoutUser: { id: 'course-authoring.library-authoring.generic.status-widget.last-published-no-user', - defaultMessage: 'Last published on {date} at {time} UTC.', + defaultMessage: 'Last published on {date} at {time}.', description: 'Body message of the library authoring sidebar when the entity is published.', }, lastDraftMsg: { id: 'course-authoring.library-authoring.generic.status-widget.last-draft', - defaultMessage: 'Draft saved on {date} at {time} UTC by {user}.', + defaultMessage: 'Draft saved on {date} at {time} by {user}.', description: 'Body message of the library authoring sidebar when the entity is on draft status.', }, lastDraftMsgWithoutUser: { id: 'course-authoring.library-authoring.generic.status-widget.last-draft-no-user', - defaultMessage: 'Draft saved on {date} at {time} UTC.', + defaultMessage: 'Draft saved on {date} at {time}.', description: 'Body message of the library authoring sidebar when the entity is on draft status.', }, publishButtonLabel: {