function event_get_offset in Event 5
3 calls to event_get_offset()
- event_dst in ./
event.module - Display a page with the timezone and daylight savings time regions.
- event_nodeapi in ./
event.module - hook_nodeapi implementation
- event_validate_form_date in ./
event.module - Validates the start and end times in a node form submission.
File
- ./
event_timezones.inc, line 232
Code
function event_get_offset($zid, $timestamp) {
$zones = event_get_timezones();
$zone = $zones[$zid];
if ($zone['dst_region']) {
// zone is a region which obeys dst, return correct offset
return event_is_dst($zone['dst_region'], $timestamp) ? $zone['offset_dst'] : $zone['offset'];
}
else {
// no dst offset for this region
return $zone['offset'];
}
}