function date_views_offset in Date 5
Return field or value for a timezone offset.
3 calls to date_views_offset()
- _date_views_argument_range_handler in ./
date_views.inc - _date_views_filter_handler in ./
date_views.inc - _date_views_query_alter in ./
date_views.inc - Implementation of hook_views_query() Used to make sure view defaults to current date if no date selected
File
- ./
date_views.inc, line 207
Code
function date_views_offset($field) {
switch ($field['tz_handling']) {
case 'date':
$offset = 'node_data_' . $field['field_name'] . '.' . $field['field_name'] . '_offset';
break;
case 'site':
$offset = variable_get('date_default_timezone', 0);
break;
default:
$offset = '';
break;
}
return $offset;
}