From fd412b9f22ef60fd8be7572e07c0d373742f8790 Mon Sep 17 00:00:00 2001 From: DJObleezy <156115770+Djobleezy@users.noreply.github.com> Date: Sat, 29 Mar 2025 20:32:40 -0700 Subject: [PATCH] Update BitcoinProgressBar.js --- static/js/BitcoinProgressBar.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/static/js/BitcoinProgressBar.js b/static/js/BitcoinProgressBar.js index dd6bef7..1058a62 100644 --- a/static/js/BitcoinProgressBar.js +++ b/static/js/BitcoinProgressBar.js @@ -673,17 +673,19 @@ const BitcoinMinuteRefresh = (function () { console.error("BitcoinMinuteRefresh: Error updating progress bar:", e); } } - /** * Update the terminal clock */ function updateClock() { try { const now = new Date(Date.now() + (serverTimeOffset || 0)); - const hours = String(now.getHours()).padStart(2, '0'); + let hours = now.getHours(); const minutes = String(now.getMinutes()).padStart(2, '0'); const seconds = String(now.getSeconds()).padStart(2, '0'); - const timeString = `${hours}:${minutes}:${seconds}`; + const ampm = hours >= 12 ? 'PM' : 'AM'; + hours = hours % 12; + hours = hours ? hours : 12; // the hour '0' should be '12' + const timeString = `${String(hours).padStart(2, '0')}:${minutes}:${seconds} ${ampm}`; // Update both clocks (normal and minimized views) const clockElement = document.getElementById('terminal-clock'); @@ -703,9 +705,6 @@ const BitcoinMinuteRefresh = (function () { /** * Update the uptime display */ - /** - * Update the uptime display - */ function updateUptime() { if (serverStartTime) { try {