You are here

function visitors_get_mysql_current_timezone in Visitors 8.2

Same name and namespace in other branches
  1. 8 visitors.module \visitors_get_mysql_current_timezone()
  2. 7.2 visitors.module \visitors_get_mysql_current_timezone()
  3. 7 visitors.module \visitors_get_mysql_current_timezone()
  4. 7.0 visitors.module \visitors_get_mysql_current_timezone()

Get value of MySQL system variable time_zone.

Return value

string

1 call to visitors_get_mysql_current_timezone()
visitors_mysql_date_format_sql in ./visitors.module
Set date format for mysql sql query.

File

./visitors.module, line 61
Logs visitors for your site.

Code

function visitors_get_mysql_current_timezone() {
  $query = 'SHOW variables LIKE \'time_zone\'';
  return \Drupal::database()
    ->query($query)
    ->fetchField(1);
}