From e296cf39c05ed0bf50664622f6b54f1eb99bdd6b Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Fri, 21 Jul 2023 00:02:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(route):=20AP=20News=E6=97=B6=E5=8C=BA?= =?UTF-8?q?=E8=B0=83=E6=95=B4=20(#12842)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/v2/apnews/topics.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/v2/apnews/topics.js b/lib/v2/apnews/topics.js index 394836b980..573fb2baf5 100644 --- a/lib/v2/apnews/topics.js +++ b/lib/v2/apnews/topics.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); +const timezone = require('@/utils/timezone'); const HOME_PAGE = 'https://apnews.com'; module.exports = async (ctx) => { @@ -21,8 +22,8 @@ module.exports = async (ctx) => { const $ = cheerio.load(response); $('div.Enhancement').remove(); return Object.assign(item, { - pubDate: new Date($("meta[property='article:published_time']").attr('content')), - updated: new Date($("meta[property='article:modified_time']").attr('content')), + pubDate: timezone(new Date($("meta[property='article:published_time']").attr('content')), 0), + updated: timezone(new Date($("meta[property='article:modified_time']").attr('content')), 0), description: $('div.RichTextStoryBody').html(), category: $("meta[property='article:section']").attr('content'), guid: $("meta[name='brightspot.contentId']").attr('content'),