diff --git a/templates/index.html b/templates/index.html index 585d48b..24d7c92 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3816,11 +3816,17 @@ keywords: [] }; - // UTC Clock Update + // Clock Update (uses global InterceptTime for timezone/format) function updateHeaderClock() { const now = new Date(); - const utc = now.toISOString().substring(11, 19); - document.getElementById('headerUtcTime').textContent = utc; + const el = document.getElementById('headerUtcTime'); + const label = document.querySelector('.utc-label'); + if (typeof InterceptTime !== 'undefined') { + if (el) el.textContent = InterceptTime.fullTime(now); + if (label) label.textContent = InterceptTime.getLabel() || 'LOCAL'; + } else { + if (el) el.textContent = now.toISOString().substring(11, 19); + } } function setActiveModeIndicator(label) { @@ -3855,8 +3861,12 @@ } // Update clock every second + window._navClockStarted = true; setInterval(updateHeaderClock, 1000); - updateHeaderClock(); // Initial call + updateHeaderClock(); + if (typeof InterceptTime !== 'undefined' && InterceptTime.onChange) { + InterceptTime.onChange(updateHeaderClock); + } applyKeyboardAccessibility(); // Pager message filter functions