aboutsummaryrefslogtreecommitdiff
path: root/public/js/liveClock.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/liveClock.js')
-rw-r--r--public/js/liveClock.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/public/js/liveClock.js b/public/js/liveClock.js
new file mode 100644
index 0000000..0e7b5db
--- /dev/null
+++ b/public/js/liveClock.js
@@ -0,0 +1,6 @@
+function time() {
+ var span = document.getElementById("clock");
+ var d = new Date();
+ span.textContent = d.toLocaleString('en-US', {hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false, timeZone: 'Europe/London' })
+}
+setInterval(time, 1000);