From 28eb044556fc43f4548e4f9064bb65769e143849 Mon Sep 17 00:00:00 2001 From: Amy Kapernick Date: Tue, 5 Mar 2024 18:51:46 +0800 Subject: [PATCH] timezones suck and I can't be assed --- package-lock.json | 9 --------- package.json | 1 - src/components/parts/runsheet/index.tsx | 6 +++--- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 71393da..e037353 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,6 @@ "@sentry/nextjs": "^7.100.1", "calendar-link": "^2.6.0", "date-fns": "^3.3.1", - "date-fns-tz": "^2.0.0", "fathom-client": "^3.6.0", "next": "^14.1.0", "notion-to-md": "^3.1.1", @@ -4803,14 +4802,6 @@ "url": "https://github.com/sponsors/kossnocorp" } }, - "node_modules/date-fns-tz": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/date-fns-tz/-/date-fns-tz-2.0.0.tgz", - "integrity": "sha512-OAtcLdB9vxSXTWHdT8b398ARImVwQMyjfYGkKD2zaGpHseG2UPHbHjXELReErZFxWdSLph3c2zOaaTyHfOhERQ==", - "peerDependencies": { - "date-fns": ">=2.0.0" - } - }, "node_modules/dayjs": { "version": "1.11.10", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", diff --git a/package.json b/package.json index 2a8c63d..af26056 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "@sentry/nextjs": "^7.100.1", "calendar-link": "^2.6.0", "date-fns": "^3.3.1", - "date-fns-tz": "^2.0.0", "fathom-client": "^3.6.0", "next": "^14.1.0", "notion-to-md": "^3.1.1", diff --git a/src/components/parts/runsheet/index.tsx b/src/components/parts/runsheet/index.tsx index f64eb6c..4800a50 100644 --- a/src/components/parts/runsheet/index.tsx +++ b/src/components/parts/runsheet/index.tsx @@ -1,6 +1,6 @@ import { RunsheetEvent, Stakeholder } from "@ts/runsheet" import styles from './styles.module.css' -import { format } from "date-fns-tz" +import { format, add } from "date-fns" import Calendar from '@img/icons/calendar.svg' import { ics } from "calendar-link" import FrameTop from '@img/frame_top.png' @@ -58,8 +58,8 @@ const Runsheet = (props: RunsheetProps) => {events.map((event: RunsheetEvent) => ( - {format(event.start, 'h:mm aaa', { timeZone: 'Australia/Perth' })} - {event?.end && format(event.end, 'hh:mm aaa', { timeZone: 'Australia/Perth' })} + {format(add(event.start, { hours: 8 }), 'h:mm aaa')} + {event?.end && format(add(event.end, { hours: 8 }), 'hh:mm aaa')} {event.name} {event?.notes}