1 date_sql_handler.inc public date_sql_handler::db_tz_support($reset = FALSE)

See if the db has timezone name support.

File

core/modules/date/views/date_sql_handler.inc, line 44
SQL helper for Date API.

Class

date_sql_handler
A class to manipulate date SQL.

Code

public function db_tz_support($reset = FALSE) {
  $has_support = state_get('date_db_tz_support', -1);
  if ($has_support === -1 || $reset) {
    $has_support = FALSE;
    $test = db_query("SELECT CONVERT_TZ('2008-02-15 12:00:00', 'UTC', 'US/Central')")->fetchField();
    if ($test == '2008-02-15 06:00:00') {
      $has_support = TRUE;
    }
    state_set('date_db_tz_support', $has_support);
  }
  return $has_support;
}