diff --git a/dashboard/src/components/FileViewer/FileList.tsx b/dashboard/src/components/FileViewer/FileList.tsx index cfe63ba3..07e818cc 100644 --- a/dashboard/src/components/FileViewer/FileList.tsx +++ b/dashboard/src/components/FileViewer/FileList.tsx @@ -351,7 +351,7 @@ export default function FileList({
-+
{file.modification_time || file.creation_time ? formatTimeAgo( Number(file.modification_time ?? file.creation_time) * 1000 @@ -359,7 +359,7 @@ export default function FileList({ : 'Unknown Creation Time'}
-+
{file.file_type === 'Directory' ? '' : file.size diff --git a/dashboard/src/utils/util.ts b/dashboard/src/utils/util.ts index c13ba71c..8a91faab 100644 --- a/dashboard/src/utils/util.ts +++ b/dashboard/src/utils/util.ts @@ -312,7 +312,8 @@ export const formatTimeAgo = (time_ms: number) => { const diffMinutes = Math.floor(diff / (1000 * 60)); const diffSeconds = Math.floor(diff / 1000); if (diffDays > 0) { - return `${diffDays} day${diffDays > 1 ? 's' : ''} ago`; + const date = new Date(time_ms); + return `${date.toLocaleString('default', { month: 'long', year: 'numeric', day: 'numeric' })}`; } else if (diffHours > 0) { return `${diffHours} hour${diffHours > 1 ? 's' : ''} ago`; } else if (diffMinutes > 0) {