1.20.x date_sql_handler.inc | public date_sql_handler::__construct($date_type = DATE_DATETIME, $local_timezone = NULL, $offset = '+00:00') |
The object constuctor.
File
- modules/
date/ views/ date_sql_handler.inc, line 36 - SQL helper for Date API.
Class
- date_sql_handler
- A class to manipulate date SQL.
Code
public function __construct($date_type = DATE_DATETIME, $local_timezone = NULL, $offset = '+00:00') {
$this->db_connection = Database::getConnection();
$this->db_type = $this->db_connection->databaseType();
$this->date_type = $date_type;
$this->db_timezone = 'UTC';
$this->local_timezone = isset($local_timezone) ? $local_timezone : date_default_timezone();
$this->set_db_timezone($offset);
}