fix: infzm timezone (#7695)

This commit is contained in:
Sean Chao
2021-11-27 07:28:27 +00:00
committed by GitHub
parent 07b82f8ba5
commit 5b36e0b70d
+3 -1
View File
@@ -1,4 +1,5 @@
const got = require('@/utils/got');
const timezone = require('@/utils/timezone');
const cheerio = require('cheerio');
const baseUrl = 'http://www.infzm.com/contents';
@@ -16,7 +17,8 @@ module.exports = async (ctx) => {
const data = response.data.data;
const resultItem = await Promise.all(
data.contents.map(async ({ id, subject, author, publish_time }) => {
const date = new Date(publish_time);
// the timezone is GMT+8
const date = timezone(publish_time, +8);
const link = `http://www.infzm.com/contents/${id}`;
let description = '';