function mail_logger_date_api_fields in Mail Logger 6
Implementation of hook_date_api_fields(). on behalf of core fields.
All modules that create custom fields that use the 'views_handler_field_date' handler can provide additional information here about the type of date they create so the date can be used by the Date API views date argument and date filter.
File
- views/
mail_logger.views.inc, line 236 - Contains implementations of Views hooks.
Code
function mail_logger_date_api_fields($field) {
if ($field == 'mail_logger.date_sent') {
return array(
// The type of date: DATE_UNIX, DATE_ISO, DATE_DATETIME.
'sql_type' => DATE_UNIX,
// Timezone handling options: 'none', 'site', 'date', 'utc'.
'tz_handling' => 'site',
// Needed only for dates that use 'date' tz_handling.
'timezone_field' => '',
// Needed only for dates that use 'date' tz_handling.
'offset_field' => '',
// Array of "table.field" values for related fields that should be
// loaded automatically in the Views SQL.
'related_fields' => array(),
// Granularity of this date field's db data.
'granularity' => array(
'year',
'month',
'day',
'hour',
'minute',
'second',
),
);
}
}