public function SqliteDateSql::setFieldTimezoneOffset in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/query/SqliteDateSql.php \Drupal\views\Plugin\views\query\SqliteDateSql::setFieldTimezoneOffset()
Applies the given offset to the given field.
Parameters
string &$field: The date field in a string format.
int $offset: The timezone offset in seconds.
Overrides DateSqlInterface::setFieldTimezoneOffset
File
- core/
modules/ views/ src/ Plugin/ views/ query/ SqliteDateSql.php, line 119
Class
- SqliteDateSql
- SQLite-specific date handling.
Namespace
Drupal\views\Plugin\views\queryCode
public function setFieldTimezoneOffset(&$field, $offset, $string_date = FALSE) {
if (!empty($offset)) {
$field = "({$field} + {$offset})";
}
}