function event_dst in Event 5
Same name and namespace in other branches
- 5.2 event.module \event_dst()
Display a page with the timezone and daylight savings time regions.
1 string reference to 'event_dst'
- event_menu in ./
event.module - Implementation of hook_menu()
File
- ./
event.module, line 2157
Code
function event_dst() {
include_once EVENT_PATH . '/event_timezones.inc';
$timestamp = time();
$zones = event_get_timezones();
foreach ($zones as $key => $zone) {
if ($zone['dst_region']) {
$list[$zone['dst_region']][] = $zone['timezone'] . ', ' . (event_is_dst($zone['dst_region'], $timestamp) ? 'In DST' : 'Not in DST') . ': ' . event_get_offset($key, $timestamp);
}
else {
$list[$zone['dst_region']][] = $zone['timezone'] . ': ' . event_get_offset($key, $timestamp);
}
}
$regions = event_get_dst_regions();
foreach ($list as $key => $region) {
$output .= theme('box', $regions[$key], theme('item_list', $region));
}
drupal_set_title(t('Daylight Savings Regions | Current GMT: !date', array(
'!date' => gmdate('m-d-Y, H:i', $timestamp),
)));
return $output;
}