This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| solartime [2026/02/20 01:50] – Yuki | solartime [2026/02/20 16:39] (current) – Yuki | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| font-family: | font-family: | ||
| src: url(" | src: url(" | ||
| + | } | ||
| + | #clock | ||
| + | { | ||
| + | text-align: center; | ||
| } | } | ||
| #output | #output | ||
| Line 10: | Line 14: | ||
| font-family: | font-family: | ||
| font-size: 12em; | font-size: 12em; | ||
| - | text-align: center; | + | |
| + | padding: 0 0.1em; | ||
| + | color: #fcc; | ||
| + | | ||
| + | } | ||
| } | } | ||
| </ | </ | ||
| Line 19: | Line 27: | ||
| </ | </ | ||
| </ | </ | ||
| - | Latitude: <input id=" | + | Longitude: <input id=" |
| - | <div id=" | + | |
| + | < | ||
| <script src=" | <script src=" | ||
| < | < | ||
| setInterval(()=> | setInterval(()=> | ||
| var instant = temporal.Temporal.Now.instant(); | var instant = temporal.Temporal.Now.instant(); | ||
| - | var time = parseFloat(document.querySelector("# | + | var time = parseFloat(document.querySelector("# |
| var zone = temporal.Temporal.Duration.from({nanoseconds: | var zone = temporal.Temporal.Duration.from({nanoseconds: | ||
| + | var gmt = temporal.Temporal.Instant.fromEpochNanoseconds(BigInt(Math.floor(Math.abs(time)*240000000000))) | ||
| instant=instant.add(zone); | instant=instant.add(zone); | ||
| - | document.querySelector("# | + | document.querySelector("# |
| + | document.querySelector("# | ||
| }, 100); | }, 100); | ||