From dd9ff7cd81946c57ddd0e1c7a01fc754667fa5fa Mon Sep 17 00:00:00 2001 From: les Date: Thu, 8 Jul 2021 23:06:52 +0200 Subject: [PATCH] fix #120 --- server/api/controller/event.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/api/controller/event.js b/server/api/controller/event.js index 096a020e..36491af0 100644 --- a/server/api/controller/event.js +++ b/server/api/controller/event.js @@ -518,8 +518,9 @@ const eventController = { } const recurrent = e.recurrent - let cursor = dayjs() const start_date = dayjs.unix(e.start_datetime) + const now = dayjs() + let cursor = start_date > now ? start_date : now const duration = dayjs.unix(e.end_datetime).diff(start_date, 's') const frequency = recurrent.frequency const type = recurrent.type