From c106a9bff06c22905b0b48d1e2a726ae3a372a66 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Fri, 4 May 2012 13:46:08 +0800 Subject: [PATCH] MDL-27562 formslib: applydst should be always true, hence option removed from dateselector and datetimeselector form elements --- lib/form/dateselector.php | 5 ++--- lib/form/datetimeselector.php | 5 ++--- user/profile/field/datetime/field.class.php | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/form/dateselector.php b/lib/form/dateselector.php index f2acc7fd5b5..52c02011d29 100644 --- a/lib/form/dateselector.php +++ b/lib/form/dateselector.php @@ -49,12 +49,11 @@ class MoodleQuickForm_date_selector extends MoodleQuickForm_group * If not specified, then date is caclulated based on current user timezone. * Note: dst will be calculated for string timezones only * {@link http://docs.moodle.org/dev/Time_API#Timezone} - * applydst => apply users daylight savings adjustment? * optional => if true, show a checkbox beside the date to turn it on (or off) * @var array */ protected $_options = array('startyear' => 1970, 'stopyear' => 2020, - 'timezone' => 99, 'applydst' => true, 'optional' => false); + 'timezone' => 99, 'optional' => false); /** @var array These complement separators, they are appended to the resultant HTML */ protected $_wrap = array('', ''); @@ -236,7 +235,7 @@ class MoodleQuickForm_date_selector extends MoodleQuickForm_group $valuearray['day'], 0, 0, 0, $this->_options['timezone'], - $this->_options['applydst']); + true); return $value; } else { diff --git a/lib/form/datetimeselector.php b/lib/form/datetimeselector.php index e7709cd83a6..578c62464a9 100644 --- a/lib/form/datetimeselector.php +++ b/lib/form/datetimeselector.php @@ -49,13 +49,12 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group{ * If not specified, then date is caclulated based on current user timezone. * Note: dst will be calculated for string timezones only * {@link http://docs.moodle.org/dev/Time_API#Timezone} - * applydst => apply users daylight savings adjustment? * step => step to increment minutes by * optional => if true, show a checkbox beside the date to turn it on (or off) * @var array */ var $_options = array('startyear' => 1970, 'stopyear' => 2020, 'defaulttime' => 0, - 'timezone' => 99, 'applydst' => true, 'step' => 5, 'optional' => false); + 'timezone' => 99, 'step' => 5, 'optional' => false); /** @var array These complement separators, they are appended to the resultant HTML */ var $_wrap = array('', ''); @@ -258,7 +257,7 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group{ $valuearray['minute'], 0, $this->_options['timezone'], - $this->_options['applydst']); + true); return $value; } else { diff --git a/user/profile/field/datetime/field.class.php b/user/profile/field/datetime/field.class.php index 9bab24cb9e7..c6344312c0c 100644 --- a/user/profile/field/datetime/field.class.php +++ b/user/profile/field/datetime/field.class.php @@ -26,8 +26,6 @@ class profile_field_datetime extends profile_field_base { $attributes = array( 'startyear' => $this->field->param1, 'stopyear' => $this->field->param2, - 'timezone' => 99, - 'applydst' => true, 'optional' => $optional );