Skip to content

Commit

Permalink
further improvements to timestring
Browse files Browse the repository at this point in the history
  • Loading branch information
apburnie committed Jun 22, 2022
1 parent 0644d97 commit 2885e49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion explorer/client/src/__tests__/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ describe('End-to-end Tests', () => {
const value = await cssInteract(page)
.with('#timestamp')
.get.textContent();
expect(value.trim()).toBe('1 Jan 2025 01:12:07 (UTC)');
expect(value.trim()).toBe('01 Jan 2025 01:12:07 (UTC)');
});

// it('can go to object and back', async () => {
Expand Down
4 changes: 2 additions & 2 deletions explorer/client/src/utils/timeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export const convertNumberToDate = (epochTimeSecs: number | null): string => {
'Dec',
];

return `${date.getUTCDate()} ${
return `${stdToTwo(date.getUTCDate())} ${
MONTHS[date.getUTCMonth()]
} ${date.getUTCFullYear()} ${stdToTwo(date.getUTCHours())}:${stdToTwo(
date.getUTCMinutes()
)}:${stdToTwo(date.getSeconds())} (UTC)`;
)}:${stdToTwo(date.getUTCSeconds())} (UTC)`;
};

0 comments on commit 2885e49

Please sign in to comment.