Bug fix: 'off by one'month bug in mupltiple locations.

When the system/user time zone was set to GMT-13 months would lag behind by
one month.


Author: Matt Clarkson <mattc@catalyst.net.nz>
This commit is contained in:
martinlanghoff 2007-04-13 05:04:57 +00:00
parent ff406a88da
commit 76ab1c33d9
4 changed files with 6 additions and 6 deletions

View File

@ -1338,7 +1338,7 @@ function calendar_print_month_selector($name, $selected) {
$months = array();
for ($i=1; $i<=12; $i++) {
$months[$i] = userdate(gmmktime(12, 0, 0, $i, 1, 2000), '%B');
$months[$i] = userdate(gmmktime(12, 0, 0, $i, 15, 2000), '%B');
}
choose_from_menu($months, $name, $selected, '');

View File

@ -59,7 +59,7 @@ class enrol_authorize_form extends moodleform
$monthsmenu = array('' => get_string('choose'));
for ($i = 1; $i <= 12; $i++) {
$monthsmenu[$i] = userdate(gmmktime(12, 0, 0, $i, 1, 2000), "%B");
$monthsmenu[$i] = userdate(gmmktime(12, 0, 0, $i, 15, 2000), "%B");
}
$yearsmenu = array('' => get_string('choose'));
$nowdate = getdate();

View File

@ -71,7 +71,7 @@ class MoodleQuickForm_date_selector extends MoodleQuickForm_group
$days[$i] = $i;
}
for ($i=1; $i<=12; $i++) {
$months[$i] = userdate(gmmktime(12,0,0,$i,1,2000), "%B");
$months[$i] = userdate(gmmktime(12,0,0,$i,15,2000), "%B");
}
for ($i=$this->_options['startyear']; $i<=$this->_options['stopyear']; $i++) {
$years[$i] = $i;
@ -214,4 +214,4 @@ class MoodleQuickForm_date_selector extends MoodleQuickForm_group
// }}}
}
?>
?>

View File

@ -70,7 +70,7 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group{
$days[$i] = $i;
}
for ($i=1; $i<=12; $i++) {
$months[$i] = userdate(gmmktime(12,0,0,$i,1,2000), "%B");
$months[$i] = userdate(gmmktime(12,0,0,$i,15,2000), "%B");
}
for ($i=$this->_options['startyear']; $i<=$this->_options['stopyear']; $i++) {
$years[$i] = $i;
@ -228,4 +228,4 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group{
// }}}
}
?>
?>