diff options
author | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-26 05:54:46 +0000 |
---|---|---|
committer | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-26 05:54:46 +0000 |
commit | 7d565474b41400bfce2d665da96d39631458eda3 (patch) | |
tree | a0e7a345fb2caeb0eac189b10f2a101a515a2083 /functions/parse/end_vevent.php | |
parent | 52ba3b8146dd01c1c7d057359f4485aae5813124 (diff) | |
download | phpicalendar-7d565474b41400bfce2d665da96d39631458eda3.tar.gz phpicalendar-7d565474b41400bfce2d665da96d39631458eda3.tar.bz2 phpicalendar-7d565474b41400bfce2d665da96d39631458eda3.zip |
fix US holidays; fix 1743686 where byday set and timezone pushes event to different day
Diffstat (limited to 'functions/parse/end_vevent.php')
-rw-r--r-- | functions/parse/end_vevent.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/functions/parse/end_vevent.php b/functions/parse/end_vevent.php index 5970e65..80e1ce9 100644 --- a/functions/parse/end_vevent.php +++ b/functions/parse/end_vevent.php @@ -292,12 +292,18 @@ sort($recur_data); // This used to use 5 different blocks to write the array... can it be reduced further? $recur_data_hour = @substr($start_time,0,2); $recur_data_minute = @substr($start_time,2,2); +if (isset($allday_start) && $allday_start != ''){ + $recur_data_hour = '00'; + $recur_data_minute = '00'; +} foreach($recur_data as $recur_data_unixtime) { $recur_data_year = date('Y', $recur_data_unixtime); $recur_data_month = date('m', $recur_data_unixtime); $recur_data_day = date('d', $recur_data_unixtime); $recur_data_date = $recur_data_year.$recur_data_month.$recur_data_day; + /* at this point the recur data year, month, day, hour, and minute are in the default timezone for the phpicalendar installation, if that is set. We need to compare whether both the event timezone and the the phpicaledar timezone are in the same state wrt std vs daylight time. */ + if (isset($allday_start) && $allday_start != '') { $start_time2 = $recur_data_unixtime; $end_time2 = strtotime('+'.$diff_allday_days.' days', $recur_data_unixtime); |