File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 344344 li.className = ` request-link block p-4 hover:bg-gray-50 ${currentViewId == request.ID ? 'bg-indigo-50 border-l-4 border-indigo-500' : ''}` ;
345345
346346 const methodColor = getMethodColor(request.Method );
347- const timestamp = new Date (request.Timestamp ) .toLocaleString ( );
347+ const timestamp = formatTime (request.Timestamp );
348348
349349 li.innerHTML = `
350350 <div class="flex justify-between items-center mb-1">
393393 }
394394 }
395395
396+ // Helper function to format time in the same format as server-side formatTime
397+ function formatTime(dateString) {
398+ const date = new Date(dateString);
399+ const year = date.getFullYear ();
400+ const month = String(date.getMonth () + 1).padStart (2, '0');
401+ const day = String(date.getDate ()).padStart (2, '0');
402+ const hours = String(date.getHours ()).padStart (2, '0');
403+ const minutes = String(date.getMinutes ()).padStart (2, '0');
404+ const seconds = String(date.getSeconds ()).padStart (2, '0');
405+ return ` ${year}-${month}-${day} ${hours}:${minutes}:${seconds}` ;
406+ }
407+
396408 // Pagination button event listeners
397409 prevPageBtn.addEventListener ('click', () = > {
398410 if (currentPage > 1) {
You can’t perform that action at this time.
0 commit comments