Fix drag and dropped events in a different timezone get set to the wrong time

This commit is contained in:
Nathan Gray 2015-12-22 00:26:56 +00:00
parent e1d60f6729
commit 18a7c47b95

View File

@ -714,7 +714,7 @@ class calendar_uiforms extends calendar_ui
unset($recur_event['start']); unset($recur_event['end']); // no update necessary unset($recur_event['start']); unset($recur_event['end']); // no update necessary
unset($recur_event['alarm']); // unsetting alarms too, as they cant be updated without start! unset($recur_event['alarm']); // unsetting alarms too, as they cant be updated without start!
$this->bo->update($recur_event,true); // no conflict check here $this->bo->update($recur_event,true); // no conflict check here
foreach($recur_event as $_k => $_v) error_log($_k . ': ' . array2string($_v));
unset($recur_event); unset($recur_event);
unset($event['edit_single']); // if we further edit it, it's just a single event unset($event['edit_single']); // if we further edit it, it's just a single event
unset($preserv['edit_single']); unset($preserv['edit_single']);
@ -2770,7 +2770,8 @@ foreach($recur_event as $_k => $_v) error_log($_k . ': ' . array2string($_v));
} }
} }
$event['start'] = $this->bo->date2ts($targetDateTime); $d = new egw_time($targetDateTime, egw_time::$user_timezone);
$event['start'] = $d->format('ts');
$event['end'] = $event['start']+$duration; $event['end'] = $event['start']+$duration;
if ($event['recur_type'] != MCAL_RECUR_NONE && !$date && $seriesInstance) if ($event['recur_type'] != MCAL_RECUR_NONE && !$date && $seriesInstance)