Adjust date-fns parsing to limit alternate date formats

Not a fix for the GMT+0/UTC date output on Vercel builds
This commit is contained in:
2023-11-28 01:43:57 -06:00
parent 3489cc1c03
commit 494518cea5

View File

@@ -8,7 +8,7 @@ const blogCollection = defineCollection({
description: z.string(),
pubDate: z.string().transform((date) =>
z.date().parse(
parse(date, 'yyyy-MM-dd HH:mm:ss XXXX', new Date())
parse(date, 'yyyy-MM-dd HH:mm:ss XX', new Date())
)
),
tags: z.array(z.string()),