Update timezone on time page to be dynamic
Signed-off-by: Louis Hollingworth <louis@hollingworth.ch>
This commit is contained in:
parent
1e847898b9
commit
426ae17597
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
import NavBar from "../../components/NavBar.astro";
|
import NavBar from "../../components/NavBar.astro";
|
||||||
|
import TimeZone from "../../components/TimeZone.vue";
|
||||||
import Layout from "../../layouts/Layout.astro";
|
import Layout from "../../layouts/Layout.astro";
|
||||||
|
|
||||||
const crntTime = Date.now();
|
const crntTime = Date.now();
|
||||||
|
@ -29,7 +30,7 @@ const navLinks = [
|
||||||
<h1 class="title">Time Utilities</h1>
|
<h1 class="title">Time Utilities</h1>
|
||||||
<p>
|
<p>
|
||||||
Your current timezone:
|
Your current timezone:
|
||||||
{ Intl.DateTimeFormat().resolvedOptions().timeZone }
|
<TimeZone client:load />
|
||||||
</p>
|
</p>
|
||||||
<p>The current time in Unix Epoch: <code>{ Math.floor(crntTime / 1000) }</code> <br /> or <code>{crntTime}</code> in Unix millis</p>
|
<p>The current time in Unix Epoch: <code>{ Math.floor(crntTime / 1000) }</code> <br /> or <code>{crntTime}</code> in Unix millis</p>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue