mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
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:
parent
ff406a88da
commit
76ab1c33d9
@ -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, '');
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
||||
// }}}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@ -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{
|
||||
|
||||
// }}}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user