You are here

function commerce_reports_handler_field_date::convertTimestamp in Commerce Reporting 7.3

3 calls to commerce_reports_handler_field_date::convertTimestamp()
commerce_reports_handler_field_date::accept_exposed_input in includes/views/commerce_reports_handler_field_date.inc
Take input from exposed handlers and assign to this handler, if necessary.
commerce_reports_handler_field_date::post_execute in includes/views/commerce_reports_handler_field_date.inc
Interpolates the missing dates linearly.
commerce_reports_handler_field_date::pre_query in includes/views/commerce_reports_handler_field_date.inc
Makes sure a start and end date are set

File

includes/views/commerce_reports_handler_field_date.inc, line 125
Views field handler for the created date on orders.

Class

commerce_reports_handler_field_date
@file Views field handler for the created date on orders.

Code

function convertTimestamp($timestamp) {
  if (!is_numeric($timestamp)) {
    $timestamp = strtotime('today UTC');
  }
  else {
    $timestamp = strtotime('today UTC', $timestamp);
  }
  if (!empty($this->granularities[$this
    ->getFormat()]['normalizationFunction'])) {
    $timestamp = $this
      ->{$this->granularities[$this
      ->getFormat()]['normalizationFunction']}($timestamp);
  }
  return $timestamp;
}