public function date_sql_handler::__construct in Date 7.3
Same name and namespace in other branches
- 7.2 date_api/date_api_sql.inc \date_sql_handler::__construct()
The object constuctor.
File
- date_api/
date_api_sql.inc, line 108 - 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_type = Database::getConnection()
->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);
}