diff --git a/app/components/shot/ShotForm.vue b/app/components/shot/ShotForm.vue index 9dd7d77..b65db02 100644 --- a/app/components/shot/ShotForm.vue +++ b/app/components/shot/ShotForm.vue @@ -28,7 +28,7 @@ const create = async () => useApi() .setForm(form?.value) .api>( route.params.user ? `/api/user/${route.params.user}/shot` : '/api/shot', - { method: 'POST', body: { ...state, date: toUtc(state.date) } }, + { method: 'POST', body: { ...state, date: new Date(`${state.date}T00:00:00`).toISOString() } }, ) .then(() => emit('created')) diff --git a/app/pages/index.vue b/app/pages/index.vue index 12ca153..2e43681 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -1,13 +1,15 @@ diff --git a/app/utils/shared.ts b/app/utils/shared.ts index f1e5fe6..965b4b3 100644 --- a/app/utils/shared.ts +++ b/app/utils/shared.ts @@ -5,8 +5,6 @@ import type { CookieOptions } from '#app' export type HeaderIconLink = HeaderLink & { icon: string } -export const toUtc = (date: string) => new Date((new Date(date)).getTime() + (new Date(date)).getTimezoneOffset() * 60000) - export const links: HeaderIconLink[] = [ { label: 'Home',