[MRBS-general] Re: weekly display
Brought to you by:
jberanek
From: Tony F. <Ton...@nc...> - 2003-10-27 21:03:22
|
I just joined the list, because I have found the exact same bug Frank Nemeth mentioned about the weekly display not understanding the week of Daylight Savings Time changes. I believe I found a fix for the bug. If you look at the weeks prior and after the week that has an Daylight Savings Time change, there is no issue with the slots being filled incorrectly. If the midnight the day the week starts is not in Daylights Savings, but times later that week are, then the hour lost is not accounted for in the slots. I wrote a function to check a timestamp and return true if it is in Daylights Savings, and placed it in my functions.inc and modified a few lines into my week.php file: functions.inc at line 253: function isDateInDaylightsSavingsTime($timestamp) { return date("I", $timestamp); } week.php at line 193: if(!isDateInDaylightsSavingsTime($t) && isDateInDaylightsSavingsTime($week_midnight)) $t -= 3600; $end_t = min((int)round_t_up((int)$row[1], (int)$resolution, $am7), (int)$week_end+1); if(!isDateInDaylightsSavingsTime($end_t) && isDateInDaylightsSavingsTime($week_midnight)) $end_t -= 3600; These modifications seem to take care of that bug. --- Tony Fugere NCSU Soil Science Department Co-webmaster and Systems Manager ton...@nc... Frank Nemeth wrote: > Hello, > > sorry for the long explanation, but I think it helps outline the issue. > > I am having an issue with a scheduled weekly series displaying properly. > > I am setting the following paramaters: > Date: Sep 29, 2003 > Time: 7:00am > Duration: 1 hour > Room: any > Type: any > Repeat-Type: Weekly > Repeat End-Date: Jun 30, 2004 > Repeat Day: MTWT > > On a daily and monthly view basis the entry appears properly, but in > weekly view (week starting Sun Oct 26) on the fifth week of the series > the display appears one hour later. So in the above setup the series > displays at 8:00am on the second week of the series. All other weeks > appear properly. > > I have also tried the following paramaters (just to test): > Date: Oct 20, 2003 > Time: 7:00am > Duration: 1 hour > Room: any > Type: any > Repeat-Type: Weekly > Repeat End-Date: Jun 30, 2004 > Repeat Day: MTWT > > On a daily and monthly view basis the entry appears properly, but in > weekly view (week starting Sun Oct 26) on the second week of the series > the display appears one hour later. So in the above setup the series > displays at 8:00am on the second week of the series. All other weeks > appear properly. > > Any ideas why the week of Oct 26 is behaving as described above? > > I have tried this with the demo site and on one of my own servers - same > result. > > The following is my operating environment: > Meeting Room Booking System <http://mrbs.sourceforge.net/> - MRBS 1.1-pre1 > Database: MySQL 3.23.56 > System: FreeBSD 4.4-RELEASE FreeBSD 4.4-RELEASE #10: Tue Se i386 > PHP: 4.3.2 > > Any suggestions or ideas would be appreciated. > > Cheers, > Frank > |