diff --git a/lib/routes/the/index.ts b/lib/routes/the/index.ts index d9239cc1fe0a7..493b731b52ed2 100644 --- a/lib/routes/the/index.ts +++ b/lib/routes/the/index.ts @@ -9,6 +9,7 @@ import { art } from '@/utils/render'; import path from 'node:path'; import { apiSlug, bakeFilterSearchParams, bakeFiltersWithPair, bakeUrl, fetchData, getFilterParamsForUrl, parseFilterStr } from './util'; +import timezone from '@/utils/timezone'; export const handler = async (ctx) => { const { filter } = ctx.req.param(); @@ -78,7 +79,8 @@ export const handler = async (ctx) => { return { title: item.title?.rendered ?? item.title ?? title, description, - pubDate: parseDate(item.date_gmt), + pubDate: timezone(parseDate(item.date_gmt), 0), + updated: timezone(parseDate(item.modified_gmt), 0), link: item.link, category: [...new Set(terminologies.flat().map((c) => c.name))], author: item._embedded.author.map((a) => a.name).join('/'), @@ -88,7 +90,6 @@ export const handler = async (ctx) => { html: description, text: $$.text(), }, - updated: parseDate(item.modified_gmt), }; });