From dfc626bdc532314e01dd1cd4c72be03fad48ea29 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Tue, 25 Jul 2006 00:58:42 +0000 Subject: increment by time instead of date - avoids strtotime --- rss/rss.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'rss') diff --git a/rss/rss.php b/rss/rss.php index 3317eb7..a480465 100644 --- a/rss/rss.php +++ b/rss/rss.php @@ -151,11 +151,12 @@ $numdays = round((strtotime($todate) - strtotime($fromdate))/(60*60*24))+1; $thisdate = $fromdate; # start at beginning of date range, # note that usage of $thisdate is different from distribution # I use it as a date, dist uses it as a time +$thistime = strtotime($thisdate); $i = 1; #day counter $uid_arr = array(); do { - $thisdate=date('Ymd', strtotime($thisdate)); - #echo "Date: $thisdate
\n"; + $thisdate=date('Ymd', $thistime); +# echo "Date: $thisdate\ti:$i\tnumdays:$numdays
\n"; $dayofweek = localizeDate ("%a %b %e %Y", strtotime($thisdate)); if (isset($master_array[($thisdate)]) && sizeof($master_array[($thisdate)]) > 0) { foreach ($master_array[("$thisdate")] as $event_times) { @@ -222,7 +223,7 @@ $uid_arr = array(); $rss .= ''.htmlspecialchars ("$default_path").''."\n"; $rss .= ''."\n"; } - $thisdate = date("Ymd", strtotime($thisdate)+60*60*24); + $thistime = $thistime+(60*60*24); # echo "$thisdate: ".strtotime($thisdate)."->$thistime
\n"; $i++; } while ($i <= $numdays); -- cgit v1.2.3