function date_get_timezone in Date 6
Same name and namespace in other branches
- 8 date_api/date_api.module \date_get_timezone()
- 5.2 date_api.module \date_get_timezone()
- 5 date.inc \date_get_timezone()
- 6.2 date_api.module \date_get_timezone()
- 7.3 date_api/date_api.module \date_get_timezone()
- 7 date_api/date_api.module \date_get_timezone()
- 7.2 date_api/date_api.module \date_get_timezone()
Function to figure out which timezone applies to a date and select it
5 calls to date_get_timezone()
- date_data_integrity in date/
date.install - Progressive update of date information, integrity checking of all date values.
- date_formatter_process in date/
date.module - Helper function for creating formatted date arrays from a formatter.
- _date_field_update in date/
date_elements.inc - Private implementation of hook_field update and insert operations.
- _date_repeat_widget_validate in date/
date_repeat.inc - Validation for date repeat form element.
- _date_widget in date/
date_elements.inc - Private implementation of hook_widget().
File
- date/
date.module, line 252 - Defines date/time field types for the Content Construction Kit (CCK).
Code
function date_get_timezone($handling, $timezone = '') {
switch ($handling) {
case 'site':
$timezone = date_default_timezone_name(FALSE);
break;
case 'date':
$timezone = !empty($timezone) ? $timezone : date_default_timezone_name();
break;
case 'none':
case 'utc':
$timezone = 'UTC';
break;
default:
$timezone = date_default_timezone_name();
}
return $timezone > '' ? $timezone : date_default_timezone_name();
}