Skip to content

Commit ccce44a

Browse files
fix: library metadata times are actually displayed in local time (#1309)
1 parent ff67c9a commit ccce44a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/library-authoring/component-info/ComponentManagement.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('<ComponentManagement />', () => {
2929
render(<ComponentManagement usageKey={mockLibraryBlockMetadata.usageKeyNeverPublished} />);
3030
expect(await screen.findByText('Draft')).toBeInTheDocument();
3131
expect(await screen.findByText('(Never Published)')).toBeInTheDocument();
32-
expect(screen.getByText(matchInnerText('SPAN', 'Draft saved on June 20, 2024 at 13:54 UTC.'))).toBeInTheDocument();
32+
expect(screen.getByText(matchInnerText('SPAN', 'Draft saved on June 20, 2024 at 13:54.'))).toBeInTheDocument();
3333
});
3434

3535
it('should render published status', async () => {
@@ -39,7 +39,7 @@ describe('<ComponentManagement />', () => {
3939
expect(await screen.findByText('Published')).toBeInTheDocument();
4040
expect(screen.getByText('Published')).toBeInTheDocument();
4141
expect(
42-
screen.getByText(matchInnerText('SPAN', 'Last published on June 21, 2024 at 24:00 UTC by Luke.')),
42+
screen.getByText(matchInnerText('SPAN', 'Last published on June 21, 2024 at 24:00 by Luke.')),
4343
).toBeInTheDocument();
4444
});
4545

src/library-authoring/generic/status-widget/messages.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ const messages = defineMessages({
2323
},
2424
lastPublishedMsg: {
2525
id: 'course-authoring.library-authoring.generic.status-widget.last-published',
26-
defaultMessage: 'Last published on {date} at {time} UTC by {user}.',
26+
defaultMessage: 'Last published on {date} at {time} by {user}.',
2727
description: 'Body message of the library authoring sidebar when the entity is published.',
2828
},
2929
lastPublishedMsgWithoutUser: {
3030
id: 'course-authoring.library-authoring.generic.status-widget.last-published-no-user',
31-
defaultMessage: 'Last published on {date} at {time} UTC.',
31+
defaultMessage: 'Last published on {date} at {time}.',
3232
description: 'Body message of the library authoring sidebar when the entity is published.',
3333
},
3434
lastDraftMsg: {
3535
id: 'course-authoring.library-authoring.generic.status-widget.last-draft',
36-
defaultMessage: 'Draft saved on {date} at {time} UTC by {user}.',
36+
defaultMessage: 'Draft saved on {date} at {time} by {user}.',
3737
description: 'Body message of the library authoring sidebar when the entity is on draft status.',
3838
},
3939
lastDraftMsgWithoutUser: {
4040
id: 'course-authoring.library-authoring.generic.status-widget.last-draft-no-user',
41-
defaultMessage: 'Draft saved on {date} at {time} UTC.',
41+
defaultMessage: 'Draft saved on {date} at {time}.',
4242
description: 'Body message of the library authoring sidebar when the entity is on draft status.',
4343
},
4444
publishButtonLabel: {

0 commit comments

Comments
 (0)