From: <ji...@us...> - 2005-11-30 02:20:42
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6081/phpicalendar Modified Files: day.php month.php week.php Log Message: change date calcs in several files for compatibility with some php installs that fail to calculate now+something Index: day.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/day.php,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -d -r1.127 -r1.128 *** day.php 24 Nov 2005 04:28:34 -0000 1.127 --- day.php 30 Nov 2005 02:20:32 -0000 1.128 *************** *** 3,7 **** $jumpto_day_time = strtotime($_GET['jumpto_day']); if ($jumpto_day_time == -1) { ! $getdate = date('Ymd', strtotime("now + $second_offset seconds")); } else { $getdate = date('Ymd', $jumpto_day_time); --- 3,7 ---- $jumpto_day_time = strtotime($_GET['jumpto_day']); if ($jumpto_day_time == -1) { ! $getdate = date('Ymd', time() + $second_offset); } else { $getdate = date('Ymd', $jumpto_day_time); *************** *** 19,23 **** $weekstart = 1; $unix_time = strtotime($getdate); ! $today_today = date('Ymd', strtotime("now + $second_offset seconds")); $next_day = date('Ymd', strtotime("+1 day", $unix_time)); $prev_day = date('Ymd', strtotime("-1 day", $unix_time)); --- 19,23 ---- $weekstart = 1; $unix_time = strtotime($getdate); ! $today_today = date('Ymd', time() + $second_offset); $next_day = date('Ymd', strtotime("+1 day", $unix_time)); $prev_day = date('Ymd', strtotime("-1 day", $unix_time)); Index: month.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/month.php,v retrieving revision 1.134 retrieving revision 1.135 diff -C2 -d -r1.134 -r1.135 *** month.php 24 Nov 2005 04:28:34 -0000 1.134 --- month.php 30 Nov 2005 02:20:32 -0000 1.135 *************** *** 14,18 **** $unix_time = strtotime($getdate); ! $today_today = date('Ymd', strtotime("now + $second_offset seconds")); $tomorrows_date = date('Ymd', strtotime("+1 day", $unix_time)); $yesterdays_date = date('Ymd', strtotime("-1 day", $unix_time)); --- 14,18 ---- $unix_time = strtotime($getdate); ! $today_today = date('Ymd', time() + $second_offset); $tomorrows_date = date('Ymd', strtotime("+1 day", $unix_time)); $yesterdays_date = date('Ymd', strtotime("-1 day", $unix_time)); Index: week.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/week.php,v retrieving revision 1.125 retrieving revision 1.126 diff -C2 -d -r1.125 -r1.126 *** week.php 24 Nov 2005 04:28:34 -0000 1.125 --- week.php 30 Nov 2005 02:20:32 -0000 1.126 *************** *** 12,16 **** $weekstart = 1; $unix_time = strtotime($getdate); ! $today_today = date('Ymd', strtotime("now + $second_offset seconds")); $next_week = date("Ymd", strtotime("+1 week", $unix_time)); $prev_week = date("Ymd", strtotime("-1 week", $unix_time)); --- 12,16 ---- $weekstart = 1; $unix_time = strtotime($getdate); ! $today_today = date('Ymd', time() + $second_offset); $next_week = date("Ymd", strtotime("+1 week", $unix_time)); $prev_week = date("Ymd", strtotime("-1 week", $unix_time)); |