From d3d8a90ee8bb89bccc3fe3abbb7800bf2f324f5b Mon Sep 17 00:00:00 2001 From: Christian Binder Date: Fri, 3 Nov 2006 13:17:00 +0000 Subject: [PATCH] ensure correct DTEND value-type (timestamp) for later calculation in calendar import function --- calendar/inc/class.boical.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.boical.inc.php b/calendar/inc/class.boical.inc.php index bfc547d349..1a268b3ce8 100644 --- a/calendar/inc/class.boical.inc.php +++ b/calendar/inc/class.boical.inc.php @@ -431,9 +431,11 @@ $vcardData['description'] = $attributes['value']; break; case 'DTEND': - if(date('H:i:s',$attributes['value']) == '00:00:00') - $attributes['value']--; - $vcardData['end'] = $attributes['value']; + $dtend_ts = is_numeric($attributes['value']) ? $attributes['value'] : $this->date2ts($attributes['value']); + if(date('H:i:s',$dtend_ts) == '00:00:00') { + $dtend_ts -= 60; + } + $vcardData['end'] = $dtend_ts; break; case 'DTSTART': $vcardData['start'] = $attributes['value'];