From f2c4006d3eda784bc888bc3dedcdeb15db0f0b8b Mon Sep 17 00:00:00 2001 From: shikajiro Date: Tue, 27 Feb 2024 17:59:07 +0900 Subject: [PATCH] =?UTF-8?q?utc=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/repository/chatwork.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/repository/chatwork.ts b/src/repository/chatwork.ts index 002b65f..43e7476 100644 --- a/src/repository/chatwork.ts +++ b/src/repository/chatwork.ts @@ -33,16 +33,15 @@ export const ChatworkRepositoryImpl = { accountId: string, message: string, ): Promise => { - let limit = 0; const now = new Date(); - limit = new Date( - now.getFullYear(), - now.getMonth(), - now.getDate() + 14, + const limit = Date.UTC( + now.getUTCFullYear(), + now.getUTCMonth(), + now.getUTCDate() + 14, 23, 59, - 59, - ).getTime(); + 59 + ); const encodedParams = new URLSearchParams(); encodedParams.set("body", message); encodedParams.set("to_ids", accountId);