diff --git a/src/components/Datetime.astro b/src/components/Datetime.astro index dfbedf0..8335f4a 100644 --- a/src/components/Datetime.astro +++ b/src/components/Datetime.astro @@ -13,7 +13,6 @@ type Props = { class?: string; size?: "sm" | "lg"; pubDatetime: string | Date; - timezone?: string; modDatetime?: string | Date | null; }; @@ -22,7 +21,6 @@ const { modDatetime, size = "sm", class: className = "", - timezone: postTimezone, } = Astro.props; const t = useTranslations(Astro.currentLocale); @@ -30,7 +28,7 @@ const t = useTranslations(Astro.currentLocale); const isModified = modDatetime && modDatetime > pubDatetime; const datetime = dayjs(isModified ? modDatetime : pubDatetime).tz( - postTimezone ?? config.site.timezone + config.site.timezone ); const date = datetime.format("D MMM, YYYY"); diff --git a/src/content.config.ts b/src/content.config.ts index 77517be..d5d432b 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -20,7 +20,6 @@ const posts = defineCollection({ description: z.string(), canonicalURL: z.string().optional(), hideEditPost: z.boolean().optional(), - timezone: z.string().optional(), }), }); diff --git a/src/pages/[...slug]/index.astro b/src/pages/[...slug]/index.astro index 9bfd35d..6e40438 100644 --- a/src/pages/[...slug]/index.astro +++ b/src/pages/[...slug]/index.astro @@ -66,7 +66,6 @@ const { canonicalURL, pubDatetime, modDatetime, - timezone, tags, hideEditPost, } = post.data; @@ -119,7 +118,7 @@ const ogImage = ogImageUrl
- +