Redefine popularity measure to include people in the queue, changing datetime to time for DB compatibility