aboutsummaryrefslogtreecommitdiffstats
path: root/rss
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2006-07-25 00:58:42 +0000
committerJim Hu <jimhu@users.sourceforge.net>2006-07-25 00:58:42 +0000
commitdfc626bdc532314e01dd1cd4c72be03fad48ea29 (patch)
tree63b76721098d21744887afd9c99a892f25df9759 /rss
parent6fd3e9b6ae4a37a92e7d86072a14d146ba5a1ae8 (diff)
downloadphpicalendar-dfc626bdc532314e01dd1cd4c72be03fad48ea29.tar.gz
phpicalendar-dfc626bdc532314e01dd1cd4c72be03fad48ea29.tar.bz2
phpicalendar-dfc626bdc532314e01dd1cd4c72be03fad48ea29.zip
increment by time instead of date - avoids strtotime
Diffstat (limited to 'rss')
-rw-r--r--rss/rss.php7
1 files changed, 4 insertions, 3 deletions
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<br>\n";
+ $thisdate=date('Ymd', $thistime);
+# echo "Date: $thisdate\ti:$i\tnumdays:$numdays<br>\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 .= '<link>'.htmlspecialchars ("$default_path").'</link>'."\n";
$rss .= '</item>'."\n";
}
- $thisdate = date("Ymd", strtotime($thisdate)+60*60*24);
+ $thistime = $thistime+(60*60*24); # echo "$thisdate: ".strtotime($thisdate)."->$thistime<br>\n";
$i++;
} while ($i <= $numdays);

© 2014-2024 Faster IT GmbH | imprint | privacy policy