From ba57ded1cdf02f267182c34f3b6ff1248830843a Mon Sep 17 00:00:00 2001 From: footair Date: Mon, 8 Apr 2019 11:28:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=80=E5=88=86=E9=92=9F?= =?UTF-8?q?=E4=B9=8B=E5=86=85=E5=8F=91=E5=B8=83=E7=9A=84=E5=BE=AE=E5=8D=9A?= =?UTF-8?q?=EF=BC=8CpubDate=E4=B8=BA'=E5=88=9A=E5=88=9A'=E7=9A=84bug=20(#1?= =?UTF-8?q?874)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决一分钟之内发布的微博,pubDate为'刚刚'的bug close #1870 --- lib/utils/date.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/utils/date.js b/lib/utils/date.js index acf662173..8ca957387 100644 --- a/lib/utils/date.js +++ b/lib/utils/date.js @@ -56,6 +56,8 @@ module.exports = (html, timeZone = -serverOffset) => { } else if (/(\d+):(\d+)/.exec(html)) { math = /(\d+):(\d+)/.exec(html); date = new Date(date.getFullYear(), date.getMonth(), date.getDate(), math[1], math[2]); + } else if (/刚刚/.exec(html)) { + math = /刚刚/.exec(html); } if (math && date) {