Spaces:
Running
Running
BraydenMoore
commited on
Commit
·
462c77b
1
Parent(s):
85130f8
Update templates/index.html
Browse files- templates/index.html +19 -1
templates/index.html
CHANGED
@@ -147,7 +147,7 @@
|
|
147 |
ip: {{ ip }}<br>
|
148 |
lat, lon: {{ loc }}<br>
|
149 |
owner: {{ org }}<br>
|
150 |
-
|
151 |
</p>
|
152 |
|
153 |
|
@@ -189,6 +189,24 @@
|
|
189 |
|
190 |
img.src = newUrl;
|
191 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
</script>
|
193 |
</body>
|
194 |
|
|
|
147 |
ip: {{ ip }}<br>
|
148 |
lat, lon: {{ loc }}<br>
|
149 |
owner: {{ org }}<br>
|
150 |
+
<span id="time"></span>
|
151 |
</p>
|
152 |
|
153 |
|
|
|
189 |
|
190 |
img.src = newUrl;
|
191 |
});
|
192 |
+
|
193 |
+
document.addEventListener("DOMContentLoaded", function() {
|
194 |
+
const timezone = "{{ timezone }}";
|
195 |
+
setInterval(() => {
|
196 |
+
const now = new Date();
|
197 |
+
const options = {
|
198 |
+
timeZone: timezone,
|
199 |
+
hour: '2-digit',
|
200 |
+
minute: '2-digit',
|
201 |
+
second: '2-digit',
|
202 |
+
hour12: true
|
203 |
+
};
|
204 |
+
const timeString = now.toLocaleTimeString('en-US', options);
|
205 |
+
document.getElementById("time").textContent = timeString;
|
206 |
+
}, 1000);
|
207 |
+
});
|
208 |
+
|
209 |
+
|
210 |
</script>
|
211 |
</body>
|
212 |
|