diff --git a/calendar/js/app.js b/calendar/js/app.js index 8e5d105011..8a7d9eff02 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -965,9 +965,12 @@ app.classes.calendar = AppJS.extend( duration: values.duration, participants: values.participants, recur_type: values.recur_type, - whole_day: values.whole_day, event_id: values.link_to.to_id, // cal_id, if available show_conflict: (egw.preference('defaultresource_sel','calendar') == 'resources_without_conflict') ? '0' : '1' + }; + if(values.whole_day) + { + request.options.exec.whole_date = true; } } return true; diff --git a/resources/inc/class.resources_bo.inc.php b/resources/inc/class.resources_bo.inc.php index 748955f0f8..f0af53e732 100755 --- a/resources/inc/class.resources_bo.inc.php +++ b/resources/inc/class.resources_bo.inc.php @@ -601,18 +601,14 @@ class resources_bo require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.calendar_bo.inc.php'); $this->bocal =& CreateObject('calendar.calendar_bo'); } - - $startarr= getdate(strtotime($cal_info['start'])); + $start = new egw_time($cal_info['start']); + $startarr= getdate($start->format('ts')); if (isset($cal_info['whole_day'])) { $startarr['hour'] = $startarr['minute'] = 0; - unset($startarr['raw']); - $start = $this->bocal->date2ts($startarr); - $end = $start + 86399; + $start = new egw_time($startarr); + $end = $start->format('ts') + 86399; } else { - $startarr['hour'] = $cal_info['start']['H']; - $startarr['minute'] = $cal_info['start']['i']; - unset($startarr['raw']); - $start = $this->bocal->date2ts($startarr); + $start = $start->format('ts'); $end = $start + ($cal_info['duration']); }