From 770a094414bd8c73016793e8a703367eecaa361f Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Thu, 16 May 2019 04:17:57 +0100 Subject: [PATCH] fix: remove pubDate due to i18n date string parsing issue (#2144) --- lib/routes/apple/exchange_repair.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/routes/apple/exchange_repair.js b/lib/routes/apple/exchange_repair.js index b2ce67d4f..ba5b3d7c2 100644 --- a/lib/routes/apple/exchange_repair.js +++ b/lib/routes/apple/exchange_repair.js @@ -25,13 +25,13 @@ module.exports = async (ctx) => { .map((i, e) => $(e).text()) .get(); - const datelist = $('tr td p') - .map((i, e) => - $(e) - .text() - .trim() - ) - .get(); + // const datelist = $('tr td p') + // .map((i, e) => + // $(e) + // .text() + // .trim() + // ) + // .get(); const out = await Promise.all( list.map(async (itemUrl, index) => { @@ -54,7 +54,7 @@ module.exports = async (ctx) => { link: itemUrl, author: 'Apple Inc.', description: description, - pubDate: new Date(datelist[index].replace(/(\d+) 年 (\d+) 月 (\d+) 日/, '$1-$2-$3')).toISOString(), + // pubDate: new Date(datelist[index].replace(/(\d+) 年 (\d+) 月 (\d+) 日/, '$1-$2-$3')).toISOString(), }; ctx.cache.set(itemUrl, JSON.stringify(single));