1 date_sql_handler.inc | date_sql_handler::sql_offset($field, $offset = NULL) |
Adjust a field value by an offset in seconds.
File
- core/
modules/ date/ views/ date_sql_handler.inc, line 156 - 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 "ADDTIME($field, SEC_TO_TIME($offset))";
}
return $field;
}