sorting events by date and time for timeline