You are here

function DateSqlHandler::__construct in Date 8

The object constuctor.

File

date_api/lib/Drupal/date_api/DateSqlHandler.php, line 28

Class

DateSqlHandler
A class to manipulate date SQL.

Namespace

Drupal\date_api

Code

function __construct($date_type = DATE_ISO, $local_timezone = NULL, $offset = '+00:00') {
  $this->db_type = db_driver();
  $this->date_type = $date_type;
  $this->db_timezone = 'UTC';
  $this->local_timezone = isset($local_timezone) ? $local_timezone : drupal_get_user_timezone();
  $this
    ->set_db_timezone($offset);
}