event_is_dst called with incorrect parameters
davej - December 4, 2008 - 17:26
| Project: | Event |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I came across what looks like a code problem while looking through event.module . I haven't linked this to observable behaviour but I'd expect there to be some.
Version: event-6.x-2.x-dev dated 2nd Dec 2008.
The definition of function event_is_dst has:
<?php
function event_is_dst($dst_region, $time)
?>However AFAICS the function is called with incorrect parameters in the following places:
event_nodeapi case 'presave' (lines 2364-5):
<?php
$node->event['start_in_dst'] = event_is_dst($node->event['timezone'], $node->event['start_exploded']);
$node->event['end_in_dst'] = event_is_dst($node->event['timezone'], $node->event['end_exploded']);
?>- First parameter given as time zone instead of dst_region.
event_check_dst (line 2541):
<?php
return (event_is_dst($event) ? $event->event['offset_dst'] : $event->event['offset']);
?>- Only one parameter given.
Hope this is helpful - I appreciate that I'm reporting against a dev snapshot, which may therefore be in the middle of planned changes.
Dave

#1
Indeed, this was a bug which is fixed now.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.