diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2021-09-07 16:25:55 -0400 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2021-09-07 16:25:55 -0400 |
| commit | 2f725b48778011c59f67608f041f78dbe810c50b (patch) | |
| tree | 993c81ea1af8041166abf4f0bc044c647d7daf24 /src | |
| parent | 6ee231a9e093d01bb67d5044a8a3832424be3890 (diff) | |
| download | submelon.dev-2f725b48778011c59f67608f041f78dbe810c50b.tar.gz submelon.dev-2f725b48778011c59f67608f041f78dbe810c50b.tar.bz2 submelon.dev-2f725b48778011c59f67608f041f78dbe810c50b.zip | |
fix timezone burp
Diffstat (limited to 'src')
| -rw-r--r-- | src/pages/index.tsx | 12 |
1 files changed, 6 insertions, 6 deletions
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) + "." + |
