From b08aeab3a4d28af7a20cf6213d715d6917e51820 Mon Sep 17 00:00:00 2001 From: Joshua Ryder Date: Thu, 2 Oct 2025 00:32:54 -0400 Subject: [PATCH] Fix timezone issue: dates now display correctly by forcing local time interpretation --- components/SermonCard.vue | 3 ++- pages/index.vue | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/SermonCard.vue b/components/SermonCard.vue index 30e586c..8283f07 100644 --- a/components/SermonCard.vue +++ b/components/SermonCard.vue @@ -34,7 +34,8 @@ defineProps<{ }>() function formatDate(dateString: string) { - const date = new Date(dateString) + // Add T00:00:00 to ensure the date is interpreted as local time, not UTC + const date = new Date(dateString + 'T00:00:00') return date.toLocaleDateString('en-US', { year: 'numeric', month: 'long', diff --git a/pages/index.vue b/pages/index.vue index 14f68b6..22e9243 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -155,7 +155,8 @@ const hasCurrentSermons = computed(() => { }) function formatDate(dateString: string) { - const date = new Date(dateString) + // Add T00:00:00 to ensure the date is interpreted as local time, not UTC + const date = new Date(dateString + 'T00:00:00') return date.toLocaleDateString('en-US', { year: 'numeric', month: '2-digit',