From 051325b3d9f2b88903c42f0b0bf6253a3064812c Mon Sep 17 00:00:00 2001 From: skeeter Date: Wed, 17 Jan 2001 03:20:35 +0000 Subject: [PATCH] fix for displaying of events across days --- calendar/inc/class.calendar.inc.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar.inc.php b/calendar/inc/class.calendar.inc.php index 34fb7f6562..9968f11557 100755 --- a/calendar/inc/class.calendar.inc.php +++ b/calendar/inc/class.calendar.inc.php @@ -767,8 +767,21 @@ } else { $format = "H:i"; } - $p->set_var('start_time',$phpgw->common->show_date($lr_events->datetime,$format)); - $p->set_var('end_time',$phpgw->common->show_date($lr_events->edatetime,$format)); + if($lr_events->datetime < $date["raw"]) { + $temp_time = $this->makegmttime(0,0,0,$date["month"],$date["day"],$date["year"]); + $start_time = $phpgw->common->show_date($temp_time["raw"],$format); + } else { + $start_time = $phpgw->common->show_date($lr_events->datetime,$format); + } + + if($lr_events->edatetime > ($date["raw"] + 86400)) { + $temp_time = $this->makegmttime(23,59,59,$date["month"],$date["day"],$date["year"]); + $end_time = $phpgw->common->show_date($temp_time["raw"],$format); + } else { + $end_time = $phpgw->common->show_date($lr_events->edatetime,$format); + } + $p->set_var('start_time',$start_time); + $p->set_var('end_time',$end_time); } else { $p->set_var('start_time',''); $p->set_var('end_time','');