Skip to content
Snippets Groups Projects
Commit 0f31a11a authored by Andy Kirkham's avatar Andy Kirkham
Browse files

#154169 by myself

parent adc1b9da
Branches hotfix/4.7.0
Tags 4.7.0 8.x-4.7
No related merge requests found
......@@ -122,15 +122,23 @@ function scheduler_form_alter($form_id, &$form) {
);
//default to user timezone, if not specified, default to system wide timezone
global $user;
$zones = _system_zonelist();
$form['scheduler_settings']['timezone'] = array(
'#type' => 'select',
'#title' => t('Time zone'),
'#default_value' => $defaults->timezone ? $defaults->timezone : (strlen($user->timezone) ? $user->timezone : variable_get('date_default_timezone', 0)),
'#options' => $zones,
'#description' => t('Select the time zone to (un)publish in.')
);
if (variable_get('configurable_timezones', 1) == 1) {
global $user;
$zones = _system_zonelist();
$form['scheduler_settings']['timezone'] = array(
'#type' => 'select',
'#title' => t('Time zone'),
'#default_value' => $defaults->timezone ? $defaults->timezone : (strlen($user->timezone) ? $user->timezone : variable_get('date_default_timezone', 0)),
'#options' => $zones,
'#description' => t('Select the time zone to (un)publish in.')
);
}
else {
$form['scheduler_settings']['timezone'] = array(
'#type' => 'value',
'#value' => $defaults->timezone ? $defaults->timezone : (strlen($user->timezone) ? $user->timezone : variable_get('date_default_timezone', 0)),
);
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment