function Sql::setupTimezone

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::setupTimezone()
  2. 10 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 1845

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.