From 426ae1759760dcbe55e044f9b24c4150034ecfca Mon Sep 17 00:00:00 2001 From: Louis Hollingworth Date: Sun, 2 Oct 2022 15:51:27 +0100 Subject: [PATCH] Update timezone on time page to be dynamic Signed-off-by: Louis Hollingworth --- src/pages/utilities/time.astro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/utilities/time.astro b/src/pages/utilities/time.astro index 065f5ac..07c6ad5 100644 --- a/src/pages/utilities/time.astro +++ b/src/pages/utilities/time.astro @@ -1,6 +1,7 @@ --- import NavBar from "../../components/NavBar.astro"; +import TimeZone from "../../components/TimeZone.vue"; import Layout from "../../layouts/Layout.astro"; const crntTime = Date.now(); @@ -29,7 +30,7 @@ const navLinks = [

Time Utilities

Your current timezone: - { Intl.DateTimeFormat().resolvedOptions().timeZone } +

The current time in Unix Epoch: { Math.floor(crntTime / 1000) }
or {crntTime} in Unix millis