We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec82570 commit 9c3e24bCopy full SHA for 9c3e24b
ui/src/lib/api.ts
@@ -156,8 +156,11 @@ export async function* transformAsyncIterable<T, U>(
156
157
158
export function formatDate(timestamp: bigint | number | string) {
159
- const bigIntTimestamp = typeof timestamp === 'bigint' ? Number(timestamp) : timestamp;
160
- return new Date(bigIntTimestamp).toLocaleDateString('en-US', {
+ const numericTimestamp = typeof timestamp === 'bigint' ?
+ // convert to ms from seconds
161
+ Number(timestamp) * 1000 :
162
+ timestamp;
163
+ return new Date(numericTimestamp).toLocaleDateString('en-US', {
164
year: 'numeric',
165
month: 'short',
166
day: 'numeric',
0 commit comments