* Calendar: Fix user / server timezone mismatch could put incorrect changes in event history

This commit is contained in:
nathangray 2020-06-24 13:36:11 -06:00
parent 143be4dc98
commit d4fb758a94

View File

@ -1380,7 +1380,7 @@ class calendar_boupdate extends calendar_bo
foreach($timestamps as $ts)
{
// we convert here from user-time to timestamps in server-time!
if (isset($event[$ts])) $event[$ts] = $event[$ts] ? $this->date2ts($event[$ts],true) : 0;
if (isset($event[$ts])) $save_event[$ts] = $event[$ts] = $event[$ts] ? $this->date2ts($event[$ts],true) : 0;
}
// convert tzid name to integer tz_id, of set user default
if (empty($event['tzid']) || !($event['tz_id'] = calendar_timezones::tz2id($event['tzid'])))