Added option 'endTimePast' to getPastEvents