function QueryPluginBase::setupTimezone

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

Set the database to the current user timezone.

Return value

string The current timezone as returned by date_default_timezone_get().

2 calls to QueryPluginBase::setupTimezone()
QueryPluginBase::getTimezoneOffset in core/modules/views/src/Plugin/views/query/QueryPluginBase.php
Get the timezone offset in seconds.
Sql::setupTimezone in core/modules/views/src/Plugin/views/query/Sql.php
Set the database to the current user timezone.
1 method overrides QueryPluginBase::setupTimezone()
Sql::setupTimezone in core/modules/views/src/Plugin/views/query/Sql.php
Set the database to the current user timezone.

File

core/modules/views/src/Plugin/views/query/QueryPluginBase.php, line 234

Class

QueryPluginBase
Base plugin class for Views queries.

Namespace

Drupal\views\Plugin\views\query

Code

public function setupTimezone() {
    return date_default_timezone_get();
}

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