Refactor some of the queue stats code to use PHP's native date/time classes.