From 7f5716d141a9dfda8539b01084d9b7b777236200 Mon Sep 17 00:00:00 2001 From: jebibot <83044352+jebibot@users.noreply.github.com> Date: Fri, 10 May 2024 05:12:42 +0900 Subject: [PATCH] fix: timezone --- src/browser/components/cards/StreamCard.tsx | 2 +- src/browser/views/popup/FollowedUsers.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/browser/components/cards/StreamCard.tsx b/src/browser/components/cards/StreamCard.tsx index 38d628d3..86f31f2d 100644 --- a/src/browser/components/cards/StreamCard.tsx +++ b/src/browser/components/cards/StreamCard.tsx @@ -69,7 +69,7 @@ function StreamCard(props: StreamCardProps) { if (liveDetail?.openDate) { // @ts-expect-error update liveInfo stream.openDate = liveDetail.openDate; - return new Date(liveDetail.openDate); + return new Date(`${liveDetail.openDate}+0900`); } }, [liveDetail?.openDate]); diff --git a/src/browser/views/popup/FollowedUsers.tsx b/src/browser/views/popup/FollowedUsers.tsx index 684dc07b..f6aa7847 100644 --- a/src/browser/views/popup/FollowedUsers.tsx +++ b/src/browser/views/popup/FollowedUsers.tsx @@ -48,10 +48,10 @@ function ChildComponent(props: ChildComponentProps) { const isLive = !!channel.streamer?.openLive; if (matchesFields && [isLive, null].includes(followedUserState.status)) { + const followDate = channel.channel.personalData?.following?.followDate; items.push({ ...channel.channel, - followedAt: new Date(channel.channel.personalData?.following?.followDate ?? 0), - + followedAt: new Date(followDate ? `${followDate}+0900` : 0), isRerun: false, isLive, });