From 34dbf8531b394a7fc881b133b2e247b798b8c5a0 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 25 Jun 2020 09:38:34 -0600 Subject: [PATCH] Calendar: Fix user / server timezone mismatch could trigger an incorrect status reset --- calendar/inc/class.calendar_boupdate.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index e2de437821..2d20d4871e 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -3021,7 +3021,9 @@ class calendar_boupdate extends calendar_bo */ protected function check_reset_statuses(&$event, $old_event) { - if(!$old_event || !is_array($old_event) || $event['start'] == $old_event['start']) + // Event passed is still in user time at this point, convert to servertime for + // comparison, but don't modify it in event + if(!$old_event || !is_array($old_event) || $this->date2ts($event['start'],true) == $old_event['start']) { return false; }