diff --git a/docs/en/game.md b/docs/en/game.md index a8d269ea7b..3acc0d1563 100755 --- a/docs/en/game.md +++ b/docs/en/game.md @@ -288,5 +288,6 @@ Steam provides some official RSS feeds: News data from https://warthunder.com/en/news/ +The year, month and day provided under UTC time zone are the same as the official website, so please ignore the specific time!!! \ No newline at end of file diff --git a/docs/game.md b/docs/game.md index 886830201b..4fb519fe6d 100644 --- a/docs/game.md +++ b/docs/game.md @@ -500,6 +500,7 @@ Steam 新闻中心支持官方的 RSS 订阅: News 的数据来自 +在UTC时区下提供的年月日与官网上一致,请忽略具体的时间!!! diff --git a/lib/v2/warthunder/news.js b/lib/v2/warthunder/news.js index a15727982f..d998f216ec 100644 --- a/lib/v2/warthunder/news.js +++ b/lib/v2/warthunder/news.js @@ -3,6 +3,7 @@ const cheerio = require('cheerio'); const path = require('path'); const { art } = require('@/utils/render'); const { parseDate } = require('@/utils/parse-date'); +const timezone = require('@/utils/timezone'); const renderDescription = (desc) => art(path.join(__dirname, 'templates/description.art'), desc); module.exports = async (ctx) => { @@ -15,7 +16,8 @@ module.exports = async (ctx) => { const pageFace = $('div.showcase__item.widget') .map((_, item) => { item = $(item); - const pubDate = parseDate(item.find('div.widget__content > ul > li').text(), 'D MMMM YYYY'); + let pubDate = parseDate(item.find('div.widget__content > ul > li').text(), 'D MMMM YYYY'); + pubDate = timezone(pubDate, 0); const category = []; if (item.find('div.widget__pin').length !== 0) { category.push('pinned');