function event_where_user in Event 5.2
Same name in this branch
- 5.2 event_database.mysql.inc \event_where_user()
- 5.2 event_database.mysqli.inc \event_where_user()
- 5.2 event_database.pgsql.inc \event_where_user()
Parameters
$type either 'start' or 'end':
See also
event_where
Related topics
2 calls to event_where_user()
- event_select in ./
event.module - Return SQL string for SELECT statement
- event_where in ./
event.module - Return SQL string for WHERE statement
File
- ./
event_database.mysql.inc, line 129
Code
function event_where_user($type = 'start') {
global $user;
switch ($type) {
case 'end':
case 'start':
$timezone = isset($user->timezone) ? $user->timezone : 0;
return str_replace('%d', (int) $timezone, "(e.event_{$type} - INTERVAL IF(tz.is_dst, tz.offset_dst, tz.offset) HOUR_SECOND + INTERVAL %d SECOND)");
}
}