From 2ba218273be3fe8cc03e2c191cd99af2cd080c45 Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Wed, 18 Sep 2019 16:12:47 +0200 Subject: [PATCH] get timestamp of now --- .github/workflows/stale.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index cb2b0e2d73d..8bd1629576c 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -29,7 +29,7 @@ jobs: let elapsedDays = 15 let elapsed = elapsedDays * 24 * 60 * 60 * 1000; - let now = new Date(); + let now = new Date().getTime(); for (const issue of issues) { // If an issue was active in the past 15 days, leave it alone. if (now - new Date(issue.updated_at).getTime() < elapsedDays) { @@ -91,7 +91,7 @@ jobs: let elapsedDays = 30; let elapsed = elapsedDays * 24 * 60 * 60 * 1000; - let now = new Date(); + let now = new Date().getTime(); for (const issue of issues) { // If an issue was stale for less than elapsed time, leave it alone. if (now - new Date(issue.updated_at).getTime() < elapsed) {