diff --git a/assets/static/js/modules/ui-manager.js b/assets/static/js/modules/ui-manager.js index d72c8e7..8db8301 100644 --- a/assets/static/js/modules/ui-manager.js +++ b/assets/static/js/modules/ui-manager.js @@ -361,15 +361,15 @@ export class UIManager { updateClocks() { const now = new Date(); - const utcNow = new Date(now.getTime() + (now.getTimezoneOffset() * 60000)); - this.updateClock('utc', utcNow); - this.updateClock('update', this.lastUpdateTime); + this.updateClock('utc', now, true); // UTC clock - use UTC methods + this.updateClock('update', this.lastUpdateTime, false); // Last update clock - use local methods } - updateClock(prefix, time) { - const hours = time.getUTCHours(); - const minutes = time.getUTCMinutes(); + updateClock(prefix, time, useUTC = false) { + // Use appropriate time methods based on whether we want UTC or local time + const hours = useUTC ? time.getUTCHours() : time.getHours(); + const minutes = useUTC ? time.getUTCMinutes() : time.getMinutes(); const hourAngle = (hours % 12) * 30 + minutes * 0.5; const minuteAngle = minutes * 6;