aboutsummaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorfloppydiskette <floppydisk@hyprcat.net>2024-08-22 22:23:36 +0100
committerfloppydiskette <floppydisk@hyprcat.net>2024-08-22 22:24:01 +0100
commited711791b6f2cb4bf30e83998eff3e4dcb890c7c (patch)
tree75e0c0a5adc84d499168b2591beaf1997ce14628 /public/js
parent193a000f28c05debac9880d8d9f91d1d4426d466 (diff)
YOLO
Diffstat (limited to 'public/js')
-rw-r--r--public/js/liveClock.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/public/js/liveClock.js b/public/js/liveClock.js
index 07c9eae..0e7b5db 100644
--- a/public/js/liveClock.js
+++ b/public/js/liveClock.js
@@ -1,10 +1,6 @@
function time() {
var span = document.getElementById("clock");
var d = new Date();
- var s = d.getSeconds();
- var m = d.getMinutes();
- var h = d.getHours();
- span.textContent =
- ("0" + h).substr(-2) + ":" + ("0" + m).substr(-2) + ":" + ("0" + s).substr(-2);
+ span.textContent = d.toLocaleString('en-US', {hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false, timeZone: 'Europe/London' })
}
setInterval(time, 1000);