PromotionViewsData.php in Commerce Core 8.2
File
modules/promotion/src/PromotionViewsData.php
View source
<?php
namespace Drupal\commerce_promotion;
use Drupal\commerce\CommerceEntityViewsData;
use Drupal\Core\Field\FieldDefinitionInterface;
class PromotionViewsData extends CommerceEntityViewsData {
protected function processViewsDataForDatetime($table, FieldDefinitionInterface $field_definition, array &$views_field, $field_column_name) {
parent::processViewsDataForDatetime($table, $field_definition, $views_field, $field_column_name);
if ($field_column_name == 'value') {
$views_field['field']['default_formatter'] = 'commerce_store_datetime';
$views_field['filter']['id'] = 'commerce_store_datetime';
}
}
}