export function formatDate(epoch: number): string { return new Date(epoch).toLocaleString(); } export function formatUptime(seconds?: number): string { if (!seconds) return '-'; const hours = Math.floor(seconds / 3600); const minutes = Math.floor((seconds % 3600) / 60); return `${hours}h ${minutes}m`; } export function formatBytes(bytes?: number): string { if (!bytes) return '-'; if (bytes < 1024) return bytes + ' B'; if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(1) + ' KB'; return (bytes / (1024 * 1024)).toFixed(1) + ' MB'; }