1.20.x date_sql_handler.inc | date_sql_handler::sql_offset($field, $offset = NULL) |
Adjust a field value by an offset in seconds.
File
- modules/
date/ views/ date_sql_handler.inc, line 124 - SQL helper for Date API.
Class
- date_sql_handler
- A class to manipulate date SQL.
Code
function sql_offset($field, $offset = NULL) {
if (!empty($offset)) {
return $this->db_connection->dateMathSql($field, 'ADD', $offset, 'SECOND');
}
return $field;
}