|
[
Permalink
| « Hide
]
David Davies added a comment - 05/Apr/09 02:19 AM
Sorry, the meetings show up an hour late when moving from GMT to BST not an hour early as I stated in the summary. It's been a long week
David - Thanks for reporting this, especially after a busy week. I appreciate you taking the time to do so. The suggested patch above looks like it is for the MRBS code rather than the new Moodle block version. Have you tested the change above in /blocks/mrbs/web/functions.php? The date_default_timezone_set function does not exist in the MRBS Moodle block. Also, specifying a particular timezone in config.php is not going to work. I think I need to work on fixing this in a more Moodle-esque way but to do so, I need to be able to re-create the problem on my end so that I can see what is happening, where and why. Any help folks can give me to better understand the root of this issue would be helpful. I do not think creating a global variable and using the code above is a good idea. In fact, that is part of why I forked as I thought the MRBS code was becoming sloppy. Peace - Anthony
I sent the MRBS project email a message to see how we might resolve some of our concerns. In all honesty, I would be happy to pass off maintenance of the MRBS Moodle block project to someone else if they are interested. I would still provide all the help I can; however, I do not feel I have the time to give this block the TLC that it needs to keep it functional for the Moodle community. Peace - Anthony
Anthony - Afraid we're not using Moodle. I was just giving back to your community in exchange for the SQL fix which got us out of a hole on Monday morning. I would expect the function to work, but you will have to feed it the timezone from somewhere. Some sort of configuration issue I guess. in Xp. David
Anthony - date_default_timezone_set is a php function btw qv http://uk3.php.net/date_default_timezone_set
No worries David - thanks for taking the time to create the issue. I'll wait for the folks who are using Moodle to give me more information. I have some ideas I just want to make sure I understand the situation completely before I start making changes. All of the timezone stuff is pretty complicated and makes me dizzy and it is handled mostly by other functions in Moodle in the block so I'll wait and see what we figure out. Peace - Anthony
David - Thanks for the link about the date_default_timezone_set function. It is a PHP 5 function so now I understand why they were checking for it. I'll have to give it some thought since Moodle 1.9 does not require PHP 5. Peace - Anthony
Those running MRBS in PHP 5 on Linux would be the ones with the problem Anthony. PHP 4 is no longer supported, so I would expect most to be running PHP 5 by now, but not necessarily on a Linux server. in Xp. David
I just ran into this problem using Moodle's MRBS block - I'm working on a patch now.
This patch creates the function mrbs_correct_dst which works out if the time passed to it is in DST when the current time is not (or vice versa) and corrects it as appropriate.
If a booking that takes place after the switch to DST is being made before the switch, the time is altered so that is will be correct after the switch. If a booking that takes place after the switch to DST is being viewed before the switch, the time is altered so that it looks correct before the switch. The calls to the function are in edit_entry_handler.php, day.php, week.php and userweek.php. Let me know if I've missed anywhere. Mike - I am going to go ahead an re-assign this to you for the time being. Might you have a moment to review/test this patch. I took a quick look and it looks good to me but I did not actually test it. If it tests out OK, let's go ahead and apply this. Thanks for your help. Peace - Anthony
p.s. - If you do not have time, then just re-assign the issue back to me and I'll get to it when I can. It turns out that patch doesn't fix userweek.php. I'll take another look later today.
That first patch only applies the fix to the day view. This applies it to day, week, month and userweek, so ignore the first one.
This patch works in addition to the previous one to allow bookings made before a switch to or from DST (using the method implemented in the previous patch) to show up alongside "normal" bookings after a switch to/from DST occurs.
Your PHP setup must be configured with the correct timezone on your server, or the changes will not be recognised correctly - don't leave it set to UTC! |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||