From: <par...@us...> - 2010-05-27 15:40:44
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13361/functions/parse Modified Files: Tag: version-2-4 recur_functions.php Log Message: Fix RRULE:UNTIL ending too early. Thanks to jpommer: http://phpicalendar.net/forums/viewtopic.php?f=45&t=3994#p14559 Index: recur_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/recur_functions.php,v retrieving revision 1.20.2.1.2.1 retrieving revision 1.20.2.1.2.2 diff -C2 -d -r1.20.2.1.2.1 -r1.20.2.1.2.2 *** recur_functions.php 27 May 2010 15:38:21 -0000 1.20.2.1.2.1 --- recur_functions.php 27 May 2010 15:40:36 -0000 1.20.2.1.2.2 *************** *** 26,35 **** sort($times); } - $until_date = date('Ymd', $end_range_unixtime); foreach ($times as $time) { if (!isset($time) || $time == '') continue; // Why are we arbitrarily setting the time to noon? $date = date('Ymd', $time); $time = strtotime($date . ' 12:00:00'); # day offset fixes shifts across day boundaries due to time diffs. # These are already fixed for the initial instance, but need to be fixed for recurrences --- 26,38 ---- sort($times); } foreach ($times as $time) { if (!isset($time) || $time == '') continue; + // Why are we arbitrarily setting the time to noon? $date = date('Ymd', $time); $time = strtotime($date . ' 12:00:00'); + $until_date = date('Ymd', $until_unixtime); + $until_unixtime = strtotime($until_date . ' 12:00:00'); + # day offset fixes shifts across day boundaries due to time diffs. # These are already fixed for the initial instance, but need to be fixed for recurrences |