diff options
author | Chad Little <clittle@users.sourceforge.net> | 2002-10-17 20:56:05 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2002-10-17 20:56:05 +0000 |
commit | d718a7de1d0132b0bfbf36c54c10bc32cad5e109 (patch) | |
tree | caad5c349a2e4aa95c274ae54fee35e7b5e2a931 /functions | |
parent | 40591c839f39555c1f32584d153acfd957c8b5b5 (diff) | |
download | phpicalendar-d718a7de1d0132b0bfbf36c54c10bc32cad5e109.tar.gz phpicalendar-d718a7de1d0132b0bfbf36c54c10bc32cad5e109.tar.bz2 phpicalendar-d718a7de1d0132b0bfbf36c54c10bc32cad5e109.zip |
End times past midnight end at midnight now.
Diffstat (limited to 'functions')
-rw-r--r-- | functions/ical_parser.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 77f59e1..0ee5428 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -80,13 +80,12 @@ if ($parse_file) { unset ( $start_time, $start_time, $start_date, $end_date, $summary, $allday_start, $allday_end, $start, $end, $the_duration, - $beginning, $rrule_array, $start_of_vevent, $description, $valarm_description + $beginning, $rrule_array, $start_of_vevent, $description, + $valarm_description ); $except_dates = array(); $except_times = array(); - - $allday_written = FALSE; $first_duration = TRUE; $count = 1000000; $valarm_set = FALSE; @@ -108,6 +107,9 @@ if ($parse_file) { $allday_end = ($start_date + 1); } + // If the events go past midnight + if ($end_time < $start_time) $end_time = 2359; + if (isset($start_time) && $start_time != '') { ereg ('([0-9]{2})([0-9]{2})', $start_time, $time); ereg ('([0-9]{2})([0-9]{2})', $end_time, $time2); |