From: <ji...@us...> - 2008-12-24 09:54:34
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31477/functions/parse Modified Files: end_vevent.php Log Message: fix to use UTC for until Index: end_vevent.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/end_vevent.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** end_vevent.php 24 Dec 2008 08:49:37 -0000 1.11 --- end_vevent.php 24 Dec 2008 09:54:28 -0000 1.12 *************** *** 12,16 **** */ ! if (!isset($start_date)) echo "no start date for $summary<br>"; // Handle DURATION --- 12,16 ---- */ ! if (!isset($start_date)) $start_date = "19700101"; // Handle DURATION *************** *** 132,140 **** break; case 'UNTIL': ! $until = str_replace('T', '', $val); ! $until = str_replace('Z', '', $until); ! if (strlen($until) == 8) $until = $until.'235959'; ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})', $until, $regs); ! $until_unixtime = mktime($regs[4],$regs[5],@$regs[6],$regs[2],$regs[3],$regs[1]); $recur_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = localizeDate($dateFormat_week,$until); break; --- 132,142 ---- break; case 'UNTIL': ! #$until = str_replace('T', '', $val); ! #$until = str_replace('Z', '', $until); ! #if (strlen($until) == 8) $until = $until.'235959'; ! # UNTIL must be in UTC ! $until = date("YmdHis",strtotime($val)); ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})', $until, $regs); ! $until_unixtime = mktime($regs[4],$regs[5],@$regs[6],$regs[2],$regs[3],$regs[1]); $recur_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = localizeDate($dateFormat_week,$until); break; |