function Sql::setupTimezone

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::setupTimezone()
  2. 8.9.x core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::setupTimezone()
  3. 11.x core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::setupTimezone()

Overrides QueryPluginBase::setupTimezone

File

core/modules/views/src/Plugin/views/query/Sql.php, line 1853

Class

Sql
Views query plugin for an SQL query.

Namespace

Drupal\views\Plugin\views\query

Code

public function setupTimezone() {
    // Set the database timezone offset.
    static $already_set = FALSE;
    if (!$already_set) {
        $this->dateSql
            ->setTimezoneOffset('+00:00');
        $already_set = TRUE;
    }
    return parent::setupTimezone();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.