Strange behavior for multi-day events

The ‘All Day’ checkbox in create/update event-edit page seems to have a coding error in it. When the all-day flag is enabled the calendar just shows 1 day. When the checkbox is not checked the code works fine for multi-day.