Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv7488/functions
Modified Files:
ical_parser.php
Log Message:
Corrected mistaken duration handling.
Index: ical_parser.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v
retrieving revision 1.117
retrieving revision 1.118
diff -C2 -d -r1.117 -r1.118
*** ical_parser.php 14 Nov 2003 05:47:26 -0000 1.117
--- ical_parser.php 14 Nov 2003 09:30:38 -0000 1.118
***************
*** 117,123 ****
} elseif ($line == 'END:VEVENT') {
! $end_unixtime = $start_unixtime + $the_duration;
! $end_time = date ('Hi', $end_unixtime);
!
// CLASS support
if (isset($class)) {
--- 117,126 ----
} elseif ($line == 'END:VEVENT') {
! // Handle DURATION
! if (!isset($end_unixtime) && isset($the_duration)) {
! $end_unixtime = $start_unixtime + $the_duration;
! $end_time = date ('Hi', $end_unixtime);
! }
!
// CLASS support
if (isset($class)) {
***************
*** 147,155 ****
if (!isset($start_time)) $start_time = $master_array[$old_start_date][$old_start_time][$uid]['event_start'];
if (!isset($start_unixtime)) $start_unixtime = $master_array[$old_start_date][$old_start_time][$uid]['start_unixtime'];
- // Handle DURATION
- if (!isset($end_unixtime) && isset($the_duration)) {
- $end_unixtime = $start_unixtime + $the_duration;
- $end_time = date ('Hi', $end_unixtime);
- }
if (!isset($end_unixtime)) $end_unixtime = $master_array[$old_start_date][$old_start_time][$uid]['end_unixtime'];
if (!isset($end_time)) $end_time = $master_array[$old_start_date][$old_start_time][$uid]['event_end'];
--- 150,153 ----
***************
*** 873,877 ****
$end_time = $regs[4] . $regs[5];
$end_unixtime = mktime($regs[4], $regs[5], 0, $regs[2], $regs[3], $regs[1]);
!
$dlst = date('I', $end_unixtime);
$server_offset_tmp = chooseOffset($end_unixtime);
--- 871,875 ----
$end_time = $regs[4] . $regs[5];
$end_unixtime = mktime($regs[4], $regs[5], 0, $regs[2], $regs[3], $regs[1]);
!
$dlst = date('I', $end_unixtime);
$server_offset_tmp = chooseOffset($end_unixtime);
|