From 28ae122eff41bd23a66cb59d3586c36d2f220002 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 27 Jan 2019 22:21:25 +0800 Subject: [PATCH] refactor: avoid using 28800000 directly --- src/disqus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/disqus.js b/src/disqus.js index 7b3d4c4..4c41d48 100644 --- a/src/disqus.js +++ b/src/disqus.js @@ -115,7 +115,7 @@ date = Date.parse(new Date(date)); // Disqus API 返回的是 UTC 时间,所以在时间戳上加 28800000 毫秒补上 8 小时时差 - date = new Date(date + 28800000); + date = new Date(date + 8 * 60 * 60 * 1000); let y = date.getFullYear(); let m = date.getMonth() + 1; // 如果不足两位则补 0