From 2f725b48778011c59f67608f041f78dbe810c50b Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Tue, 7 Sep 2021 16:25:55 -0400 Subject: fix timezone burp --- src/pages/index.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 22efa1b..bfd11c8 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -5,7 +5,7 @@ import SEO from "../components/SEO"; import "../styles/main.css"; import { FaMastodon } from "react-icons/fa"; -const TIMESTAMP = "1619122879"; +const TIMESTAMP = "1631045797"; const SHORT_CHARS = [ "0", "1", @@ -81,11 +81,11 @@ function toShort(valu: number): string { function getTimestamp(seconds: number): string { const date = new Date(seconds * 1000); - const year = date.getFullYear(); - const month = date.getMonth(); - const day = date.getDate(); - const hour = date.getHours(); - const minute = date.getMinutes(); + const year = date.getUTCFullYear(); + const month = date.getUTCMonth(); + const day = date.getUTCDate(); + const hour = date.getUTCHours(); + const minute = date.getUTCMinutes(); return ( toShort(year) + "." + -- cgit