From 63ca8b0fde76de08c6d2d319426c6bab13d079e6 Mon Sep 17 00:00:00 2001 From: lesion Date: Tue, 9 Aug 2022 14:57:56 +0200 Subject: [PATCH] fix timezone events in home calendar --- assets/helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/helper.js b/assets/helper.js index aaa1dd02..4b7c2185 100644 --- a/assets/helper.js +++ b/assets/helper.js @@ -7,7 +7,7 @@ export function attributesFromEvents (_events) { let attributes = [] const now = dayjs().unix() for(let e of _events) { - const key = dayjs.unix(e.start_datetime).format('YYYYMMDD') + const key = dayjs.unix(e.start_datetime).tz().format('YYYYMMDD') const c = e.start_datetime < now ? 'vc-past' : '' const i = attributes.find(a => a.day === key)