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 <[email protected]>
This commit is contained in:
martinlanghoff
2007-04-13 05:05:56 +00:00
parent 20414f20ff
commit 8632e95b13
4 changed files with 6 additions and 6 deletions
+1 -1
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, '');
+1 -1
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();
+2 -2
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
// }}}
}
?>
?>
+2 -2
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{
// }}}
}
?>
?>