Improve handling for events that end at midnight.