diff --git a/docroot/sites/all/modules/contrib/heartbeat/heartbeat.module b/docroot/sites/all/modules/contrib/heartbeat/heartbeat.module index d06fa83..d6f3fdd 100644 --- a/docroot/sites/all/modules/contrib/heartbeat/heartbeat.module +++ b/docroot/sites/all/modules/contrib/heartbeat/heartbeat.module @@ -1755,3 +1755,36 @@ function _heartbeat_perms_options($profile = FALSE) { ); } } + +/** + * Implement hook_date_api_tables(). + */ +function heartbeat_date_api_tables() { + return array('heartbeat_activity'); +} + +/** + * Implementation of hook_date_api_fields(). + */ +function heartbeat_date_api_fields($field) { + $values = 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'), + ); + + switch ($field) { + case 'heartbeat_activity.timestamp': + return $values; + } +}