Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.9.3
-
Fix Version/s: None
-
Component/s: Block: Mrbs
-
Labels:None
-
Environment:OSX PHP 5 MySQL
-
Database:MySQL
-
Difficulty:Easy
-
Affected Branches:MOODLE_19_STABLE
Description
MRBS main page listing contains two "October" months in a row. One functions as month 10 and one as 11 but has posed confusion on our site.
Using the most recent ver as of about 8/15/09
I would not mind advice on finding the error in the code so I can do a quick fix myself but should be corrected in next ver.
Dan - I have added Mike Worth as a watcher of this. The place to look at is in the /blocks/mrbs/web/trailer.php around line 45 (actually 39-54) is the relevant section. It is curious what might be happening and knowing what timezone your server is set to may be helpful. In addition, what is the timezone for the particular Moodle user looking at the page?
For a quick fix I might try switching line 45 from:
$ctime = mktime(0, 0, 0, $month, $day + 7 * $i - $skipback, $year);
to
$ctime = mktime(12, 0, 0, $month, $day + 7 * $i - $skipback, $year);
It is really not the cleanest of solutions theoretically but it may provide you a quick and easy fix.
Mike may have a more elegant solution but I see no reason why this needs to be set to midnight. Dates and timezones can be tricky to work with especially when you have an international site as an issue will come up for one user on one timezone and not another. Thanks for reporting this and let me know if the quick and dirty fix actually fixes the problem for you.
Peace - Anthony