function date_timezone_form_alter in Date 5.2
Same name and namespace in other branches
- 6.2 date_timezone/date_timezone.module \date_timezone_form_alter()
- 6 date_timezone/date_timezone.module \date_timezone_form_alter()
Implementation of hook_form_alter().
Override system handling of user and site timezone selection.
File
- date_timezone/
date_timezone.module, line 38 - This module will make the alter the user and site timezone forms to select a timezone name instead of a timezone offset.
Code
function date_timezone_form_alter($form_id, &$form) {
if ($form_id == 'system_date_time_settings') {
$form['#process'] = array(
'date_timezone_site_form' => array(),
);
}
elseif ($form_id == 'user_edit' && variable_get('configurable_timezones', 1) && isset($form['timezone'])) {
$form['#process'] = array(
'date_timezone_user_form' => array(),
);
}
}