function event_dst in Event 5.2
Same name and namespace in other branches
- 5 event.module \event_dst()
Display a page with the timezone and daylight savings time regions.
Related topics
1 string reference to 'event_dst'
- event_menu in ./
event.module - Implementation of hook_menu()
File
- ./
event.module, line 2406
Code
function event_dst() {
$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_check_dst($key, $timestamp);
}
else {
$list[$zone['dst_region']][] = $zone['timezone'] . ': ' . event_check_dst($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;
}