function date_set_site_timezone in Date 5
Set system variable for site default timezone Needed because current system variable tracks offset rather than timezone
1 call to date_set_site_timezone()
- _date_field_settings in ./
date_admin.inc - Implementation of hook_field_settings().
File
- ./
date.inc, line 594 - Date/time API functions
Code
function date_set_site_timezone($val) {
include_once './' . drupal_get_path('module', 'date_api') . '/date_timezones.inc';
$timezones = date_zonelist();
if (!in_array($val, $timezones)) {
$val = 'GMT';
}
variable_set('date_default_timezone_name', $val);
}